Skip to content

Instantly share code, notes, and snippets.

@ajid2
Created Aug 31, 2021
Embed
What would you like to do?
wordpress hide author page
<?php
add_action('template_redirect', 'my_custom_disable_author_page');
function my_custom_disable_author_page() {
global $wp_query;
if ( is_author() ) {
$wp_query->set_404();
status_header(404);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment