• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

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

  • Display Genesis Author Box Using Checkbox
  • Add or Remove Author Box Only When Custom Field Has Value

Author Box

Reader Interactions

Comments

  1. artofzoo says

    December 28, 2017 at 11:45 am

    good tutorial thanks

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags