Directory / plugin
Hide Author Archive
v1.3.0 · by Tarosky Inc.
Hide author archive URL of WordPress.
About this plugin
This plugin will hide author’s archive.
If your don’t need author parameter, this plugin may enhance your site’s security from bot inspection.
- No more
?author=1redirection to/author/admin - Ignore query var like
author=1orauthor_name=admin - Hide user list in REST API from user without permission
list_usersoredit_others_posts. Single user request likewp/v2/users/1is also hidden with the same capabilities, except for the user themselves and users who can edit the user. This capability is filterable.
/**
* Filter capabilities to see author list and single author.
*
* For single user request, $args is an empty array.
*
* @param string[] $caps List of capabilities.
* @param array $args Arguments for user query.
* @param WP_REST_Request|null $request Request object.
*/
add_filter( 'hide_author_archive_rest_query_capability', function( $caps ) {
$caps[] = 'read';
return $caps;
} );
- Remove users sitemap (
/wp-sitemap-users-1.xml) from core XML sitemaps. Author archive URLs revealuser_nicename, which is usually derived from login name.
Besides that, this plugin tries to remove author information from meta tags and JSON-LD as possible as it can.
- Override author section in oEmbed.
- Replace author archive links (e.g. author name link in byline) with the posts page, because the link contains
user_nicename. You can change the URL in Settings > Reading. - Remove
comment-author-{user_nicename}class from registered user’s comments. - Replace author name in feeds (
<dc:creator>in RSS,<author>in Atom) with the site name. Author’s URL is also removed from Atom feed. Display name is the same as login name by default, so feeds may reveal it.
Some organization needs to hide author information of each article.
Supported Plugins
Yoast
- Remove
meta=author - Override author section in Article scheme in JSON-LD
- Hide author section in Slack sharing.
- Hide
article:authorin OGP. - Exclude all authors from XML sitemap.