PenciDesign Supporter replied
Staff Reply
Hi,
You should paste this code into the function.php of the child theme or via the CodeSnippet plugin here: https://wordpress.org/plugins/code-snippets/
function penci_user_remove_author_posts( $query ) {
if ( ! is_admin() && $query->is_main_query() && $query->is_author() ) {
$query->set( 'post__in', array(0) ); // Prevents any posts from being displayed
}
}
add_action( 'pre_get_posts', 'penci_user_remove_author_posts' );
Regards,
PenciDesign.