How to Remove the Author Name in WordPress Posts

How to remove the author name in wordpress posts

UPDATED ON SEPTEMBER 19, 2019
PUBLISHED ON NOVEMBER 24, 2017

When you publish a post, WordPress automatically displays the author of the article. It certainly is one of the useful and informative features that WordPress provides. But, there are times when you might want to remove the author name in WordPress posts. By default, WordPress does not have an option to publish articles without an author name. However, there are some ways by which you can remove the author name in WordPress posts. So today, here at DevotePress, we will be learning the easiest ways to remove author name in WordPress posts. Let’s get started.


Remove the Author Name in WordPress Posts Using a Plugin 


The very first thing you need to do is install and activate the Hide/Remove Metadata plugin from the WordPress Plugin Directory.

Hide/Remove Metadata PluginHide/Remove Metadata plugin is super easy to use and anyone, even the beginners can easily customize the plugin as you’re not required to do the much troublesome coding. The plugin functions smoothly on any WordPress theme. With the Hide/Remove Metadata, you can either hide the author/published date/both or you can even completely remove them.

After you’ve activated the plugin, head over to Dashboard > Hide/Remove Metadata page to configure the plugin settings.

Hide/Remove Metadata Plugin Configuration

 

On the configuration page, there are three customization option – Hide By, Hide Author, and Hide Published Date.

On the Hide By dropdown option, you can either select CSS or PHP. To partially hide the information, select CSS and to completely remove them, select PHP. By selecting and hiding through CSS, one can simply get the information with the Inspect tool. However, with PHP, the information would completely be removed, even the Inspect tool would not display the author or published date information.

The other two options are quite easy to understand. If you want to hide the author of your blog, simply turn on the Hide Author option. Whereas, you can simply turn on the Hide Published Date option if you want to hide the published date of articles.

Click the Save Changes button to store your settings. And that’s it. You have successfully hidden/removed the author name in WordPress posts.

Here is an example of the website preview before and after the plugin activation.

Before Hide-Remove Metadata Activation

After Hide-Remove Metadata Plugin Activation

 

Now that you know how you can remove the author name in WordPress posts via a WordPress plugin, let’s look at the manual process. It is because the plugin might not work well with a few WordPress themes.


Remove Author Name in WordPress Posts Manually 


This method requires you to edit your WordPress theme files. So, those who are familiar with coding can use this method to remove author name in WordPress posts.

Make sure you create a backup of your theme before diving into the coding. This will help you if something goes wrong.

WordPress themes use different variations of code to display the author name. You will need to locate the code responsible for displaying the author’s name in your theme files and delete it. Most common locations to find this code are single.php, content.php, archive.php, and index.php files.

In many cases, you will not be able to find the code that outputs the author name. Instead, you will find a template tag defined in the functions.php file or template-tags.php file.

For example, the default Twenty Nineteen theme uses the function twentynineeen_posted_by to display author name and post date/time. This function is defined in the template-tags.php file.

 function twentynineteen_posted_by() {
printf(
/* translators: 1: SVG icon. 2: post author, only visible to screen readers. 3: author link. */
'<span class="byline">%1$s<span class="screen-reader-text">%2$s</span><span class="author vcard"><a class="url fn n" href="%3$s">%4$s</a></span></span>',
twentynineteen_get_icon_svg( 'person', 16 ),
__( 'Posted by', 'twentynineteen' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_html( get_the_author() )
);
}
endif;

You need to remove the code that outputs the author name.

 function twentynineteen_posted_by() {
}
endif; 

Save your changes and upload the files back to your website. You can visit your website to see the changes.

Another alternative way to hide the author in WordPress posts is to create a generic name and use it for all your past and future articles. This is the best thing to do if you do not want to show the real author. You just have to add a new author and give it a generic username. You will then need to change the author name before publishing each post.

And that is it. You can choose whichever method you feel comfortable with to hide or completely remove author name in WordPress posts.

If you have anything to add, ask or share, feel free to use the comments section.

10 thoughts on “How to Remove the Author Name in WordPress Posts

  1. Laurie Hull says:

    Downloaded Show Hide Author,activated, uncheck page and post. Author name is removed. Followed instructions to remove the “by” and “date” and they are still showing up. Entered the parent class of author vcard / “post-meta” also tried entering the tags of parent class.

    This seems pretty straightforward, not sure why it won’t work.

    L

    Reply
  2. Ashwitha says:

    Is there any new plugin for Shiw or Hide Author in the posts?

    The above plugin is not available in the WordPress plugins section.

    Kindly do the needful

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *