Mostly every theme by default displays Posted by Authorname in Home page, category page (also known as archives page) and detail page. If you want to remove this text – “Posted by” then that can also be easily done and if you just want to remove that hyperlink that points to your “Author” page, then that can also be done.
How to Remove Author Hyperlink in WordPress
Don’t worry, you don’t need to be a coder/programmer to do this task. It’s easy and anyone can do this.
Note: Before editing any file, I would recommend you take a backup of that file, so that if anything goes wrong, you can always start again.
Firstly, you will need to find the correct file for this task. In most cases, the file name is arhives.php, index.php, loop.php (in some themes) and single.php
Open the above files and find this:
<?php the_author() ?>
OR
<?php the_author_posts_link(); ?>
Theme developers may use any of the above function to display Author permalink. If you want to remove the entire “Posted by [Author hyperlink]”, then you would need to remove the code starting from “Posted by” and also remove the above code. (You will be able to find only one of the above functions, so don’t try to search both of them)
Now what if you don’t want to remove author name, but just want to remove the “hyperlink” which points to author page? E.g. Posted by Sarah, with no hyperlink to its author page. Yes, this can also be done easily. Find that above code and replace that code with this:
<?php $author = get_the_author(); echo $author; ?>
That’s done. Now you will be able to see author name, but it won’t be a hyperlink to the Author page. It would be just plain text and no hyperlink.
This is how you can remove author page hyperlink and author name from your WordPress theme.
Leave a Reply