WordPress Disable Author Archives
This WordPress snippet disables all author-archive views. This may be useful to prevent user enumeration scans, and also may help to minimize duplicate content (for SEO purposes). To disable all author archives, add the following code snippet to your theme’s functions.php file: PHP// disable author archives function shapeSpace_disable_author_archives() { if (is_author()) { global $wp_query; $wp_query->set_404(); status_header(404); } else { […]