There are a few reasons you’d want to conceal the author’s name on WordPress blog posts. Sadly, WordPress doesn’t offer a built-in way to do that, hence why many hesitate. We’re here to tell you that you shouldn’t, as the steps are relatively easy and can be permanent if done right. Plus, if you go through with it, you can gain anonymity. Additionally, if you have multiple writers contributing to one post, this eliminates having to choose whose name will be on the frontend. Finally, by not having any or only a few authors, you make your website look cohesive and uniform. With that said, this is how to hide author in WordPress.
1. Hide author in WordPress by changing the name
We’ll be upfront – this is a workaround. However, this is by far the easiest and safest way to do it and maintain it long-term. To clarify, this involves changing the author name in WordPress of the user account you want to hide. Alternatively, you can add a new user, and assign some or all of the posts to him using method 1 in that article. We recommend names such as Editorial Staff, Administrator, Admin, or just Staff. If you have a site mascot in your logo, consider its name too.
2. Hide author in WordPress with a WordPress plugin
This is the next best thing in terms of difficulty. It involves installing a WordPress plugin that with this functionality. Our recommendation is Hide/Remove Metadata because it’s constantly updated, extremely easy to use, and lightweight. After you install and activate it, follow these steps to hide author on the WordPress frontend:
- Access the WordPress Admin Section.
- Click on the Hide/Remove Metadata option in the main menu on the left.
- Go to the Dashboard tab.
- Toggle the switch next to Hide author to on.
- Under Hide By, choose between:
- CSS. The function will exist but will be hidden, as demonstrated in method 4.
- PHP. The function will be removed permanently, but backed up in the plugin, same as method 3.
- Click on the Save Changes button.
- Tip. The plugin won’t work with every theme. In themes that use a different structure or weird word phrases, the author will be hidden but words “written by” or “author” might remain. Contact the plugin developers for help.
3. Hide author in WordPress by editing theme files
It’s hard to provide a generic set of steps for hiding the author name in WordPress with so many themes out there. In essence, the goal is to edit or delete the code that displays author names on the frontend. But where is it and how does it look? Before you can look for it, use a backup plugin for WordPress to make a snapshot of your website. Then, access your WordPress website via FTP. We’d start looking in the index.php file first. Then, look through archive.php, home.php, single.php, or content.php. It might be in form of a template tag inside functions.php, too. Search for lines that mention ‘Posted by/Written by/By/Author’ or ‘get_author_posts_url’, ‘get_the_author’ , <?php the_author(); ?>, or get_the_ID that mentions authors. Here’s an example:
Twenty Nineteen
On the default WordPress theme, Twenty Nineteen, the code is inside the template-tags.php file. Here’s how to recognize the code that outputs the author name in Twenty Nineteen:
function twentynineteen_posted_by() {
printf(
<There are 6 lines of code here>
);
}
endif;
Removing the code
To remove the code responsible for the author name output, remove the lines in-between closing brackets so that only this is left:
function twentynineteen_posted_by() {
}
endif;
4. Hide author in WordPress through Additional CSS
This method is much easier and safer, because the author name will be hidden in the WordPress frontend, but the function will remain in the backend code. Also, you should be modifying a child theme in WordPress, not the main one. With that said, here are the steps you need to take:
- Go to any page on your website frontend where the author name appears.
- Right-click anywhere and select Inspect.
- Make sure the Elements tab is selected.
- Now, mouse over or highlight the author’s name with anything in front of it (Written by/Posted By/By/Author, etc.). The code responsible for its display will be highlighted in the Elements tab.
- Once you see that the right element is highlighted on the left, remember the div class highlighted on the right.
- On our theme, it was named entry-author.
- Now, to conceal it, go back to the Admin Section.
- Click on Appearance > Customize from the main menu on the left-hand side.
- On the homepage, click on the Additional CSS option in the left sidebar.
- Now, paste this into the text field:
.entry-author {
display: none;
}
- Save changes, refresh the page, and check.
- We noticed there was a word “By” leftover. After inspecting, we found its span class was byline (under div). So, we added it to the code like this:
.entry-author .byline {
display: none;
}
How does this look in other themes?
Here are 3 examples of the hiding author via CSS in other WordPress themes:
1. Divi
.entry-meta .byline, .entry-meta .cat-links { display: none; }
.entry-meta .posted-on { display: none; }
2. Twenty Twenty
.post-author.meta-wrapper {
display: none;
}
3. OceanWP
ul li.meta-author {
display: none;
}
I’m not using a child theme. What to do?
This means that with the very next theme update, your progress will be wiped. If it’s too late to switch to it, you can use a plugin such as Simple Custom CSS and JS to preserve your CSS through updates.
No-index the author profile page (Recommended)
You’ve concealed the author in WordPress, but the profile page (yourwebsite.com/author/author-name) is still visible to anyone with a direct link, including search engines. Since you obviously don’t need traffic going to it, here’s how to index a page with Yoast SEO:
- In the main WordPress menu on the left, click on Users > All Users.
- Click on the user’s name to enter its configuration.
- Scroll down to Yoast SEO settings.
- Put a checkmark in front of Do not allow search engines to show this author’s archives in search results.