I have certain categories that I do not want to show the author and date. I looked at the PHP documentation and found this for the date removal. How or does this also apply to the removal of the author?
add_filter( ‘generate_post_author_output’, function( $output ) {
// If we’re on our “my-post-type” post type, remove the author.
if ( is_post_type_archive( ‘my-post-type’ ) || ‘my-post-type’ == get_post_type() ) {
return ”;
}
// Otherwise, display it.
return $output;
} );
Thank you in advance.