This is feature image

How to Hide Author Name in Blog Posts on WordPress

Published by on August 9, 2023
Categories: BLOG WORDPRESS

In this article, we will show three methods to hide Author Name in the blog post. You can use anyone, you find helpful.
Sometimes it is required to hide the author’s name in WordPress blog posts. The reason for hiding the name is that sometimes individual blogger doesn’t want to show their name.
There are three ways to hide the author’s name. You can use anyone which suits you. In the first method, we will use a plugin and in the second and third we will hide the author’s name manually.

1. Use a WordPress plugin to hide author name

If you don’t want to edit the theme files manually and don’t want to go into technical details, then the easy way for you is to use the plugin.

1. Go to Plugin Section in WordPress Dashboard

Open the WordPress dashboard and search for the plugin in the left sidebar. Now Click “Add New”.

Dashboard to find new plugin to Hide Author Name in Blog Posts

2. Next click Add New

At the top of the dashboard panel find the button “Add New”. Now click the button “Add New”.

3 Plugin Search and Installation

In the plugin search box, write and search for “hide author name”. Search will show many plugins to hide user metadata. Find plugin Hide/Remove Metadata. It is a free plugin. After searching plugin click “Install Now”. It takes a few seconds to install the plugin, after installation click Activate.

4. Settings of Hide/Remove Metadata Plugin

After installing we have to change the setting whether we want to use CSS or PHP to hide the author’s name. We can also choose whether to hide only the author’s name or publish date also. After doing settings don’t forget to save changes by clicking “Save Changes”. You can see all steps in the image below.

Now you can check the Author’s name and Publish date in the blog post.

Sometimes we don’t want to add plugins in WordPress. The reason may be that we don’t want to make our WordPress heavy. Sometimes plugins do not work with custom-made themes where the name of CSS elements is different.
For that, we have more two methods where we can hide the author’s name manually. One is to add additional CSS and the other is to edit theme files

2. Hide Author name Manually Using Additional CSS

If you don’t have little knowledge of CSS and HTML, just follow the steps it is very easy.

Search Customize tab.

In the WordPress dashboard search for Appearance in the left sidebar, then in the pop-up menu click Customize.

It will take you to the next step.

Search Additional CSS tab

Now Click “Additional CSS” at the bottom of the left sidebar.

Adding CSS code

Now you have to paste CSS code to hide the author name. This code will hide the Class which contains the author’s name.

.entry-meta .author {
 display: none;
 } 

Now copy this code and paste it as shown in the below image.

if you want to hide Publish date you can also paste the next code.

.entry-meta .entry-date {
display: none;
}

Now click the Publish Button, to activate the code. Don’t forget to click Publish button, otherwise, it will not save and work.

In rare cases, it does not work. In such a situation you have to check the correct name of classes that contain the author’s name. Sometimes .entry-meta and .author classes may have different names or be organized in different ways in your custom themes. You can find their correct name using the browser developer tool.

3. Hide Author’s name by Editing the Theme file

In this method, we will edit the theme file to remove the author’s name. Don’t wary if you don’t know PHP or HTML, you only have to follow the steps one by one.

1. Search for Theme File editor in WordPress Dashboard.

In the left sidebar search for appearance and hover on it and then click “Theme File Editor”, steps are mentioned in the image below.

2. Edit theme content.php file.

Now find template parts in the right sidebar under the Theme Files title. Now click template-parts, and you will see a file, content.php, click it. Now you will see code in the editor in the dashboard’s center. Search for the code highlighted in the image below.

Now change $disable_author == 0 to $disable_author == 1
if you want to hide publish date you can change the line
$disable_date == 0 to $disable_date == 1.
Sometimes you do not find all these codes then you have only the option to Comment out or Delete the code which contains the author’s name. You can search terms like ( Published by, author, author-name class, etc. ) and remove or Comment out the code that includes the author’s name.
Sometimes code may be inside the “single.php” file, which may be depend upon your theme.

Conclusion

In this post we have described three method to hide author name and publish date. You can use any method you like. Every method has it’s own pros and cons.

Related Posts

Gurjit

Gurjit Singh is a Content Writer and Web developer. He has experience in theme development, front-end development, and digital market. He loves to share his knowledge to help others in creating Websites, WordPress blogs, and SEO.