I’ve noticed on our WordPress blog that I get Google hits on two forms of blog entries:
http://blog.stackoverflow.com/2011/01/twitter-question-feeds-for-stack-exchange/
and
http://blog.stackoverflow.com/author/admin/page/4/
The latter form, paginating by author, is definitely not wanted.
How can I block paging by author in WordPress? I do know how to block it in robots.txt (which I will do!) but I would prefer to turn off author paging entirely, if possible.
You can send any request for author pages to a 404 with a simple action on
parse_query
.That should send any requests for an author page to a 404.
If you wanted to go a bit further and remove the author rewrite rules you could also do that quite easily with a filter on
author_rewrite_rules
.Untested, but you’ll have to let me know if that’s not quite enough author elimination..
I don’t know precisely if you say “block paging by author” if you want to:
Anyway, WordPress follows a template hierarchy: http://codex.wordpress.org/Template_Hierarchy
Meaning: if there is a file named “author.php” in your /wp-content/theme/yourtheme folder then that file can be edited to display anything you want.
Inside that file you find “the loop” : http://codex.wordpress.org/The_Loop (under the the part were the author info is).
If you do not want to show any posts at all you can e.g. comment out the loop