WP SITES

3095 Coded Tutorials & 297 Plugins

Remove Genesis Author Box From Single Post

Copy & paste this code to the end of your child themes functions file and swap out the post id in the conditional tag.

add_action( 'get_header', 'remove_authorbox_single_post' );
function remove_authorbox_single_post(){
    if ( is_single( 1362 ) ) {
    remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
    }
}

In this example, 1362 is the post ID. The following part of the code is what you need to modify.

is_single( 1362 )

Or, like this if you want to use the post slug :

is_single( 'your-post-slug' )

Remove From Multiple Posts

You can use a array with the is_single conditional tag like this :

is_single(array( 1, 2, 3 ) )

Where 1, 2 and 3 are the post i.d’s you want the author box removed from. Full code :

add_action( 'get_header', 'remove_authorbox_single_post' );
function remove_authorbox_single_post(){
    if ( is_single(array( 1, 2, 3 ) ) ) {
    remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
    }
}

You can use either the post id or permalink slug inside the is_single() conditional tag to target specific posts.

Related Code Snippets

Was this helpful?

Yes
No
Thanks for your feedback!

One response to “Remove Genesis Author Box From Single Post”

  1. good tutorial thanks

Leave a Reply