Removing genesis_post_info From a Single Category

What I wanted to do was remove the post info before the post on only one category.

For ‘x’, type in the catagory name or catagory id.


add_action( 'genesis_before_post', 'child_conditional_post_actions' );
function child_conditional_post_actions() {

  if( in_category( 'x' ) ) {
        remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    }
   else {
        add_action( 'genesis_before_post_content', 'genesis_post_info' );
    }

} 

This is added to the bottom of your child theme’s functions.php file.

About Greg Wallace

My name is Greg Wallace. I am a WordPress website developer and designer specializing in the Genesis Framework by StudioPress.

Comments

  1. E-bike says:

    I believe other website proprietors really should take this internet site as a model, quite clean and wonderful user friendly style, as effective as the content material. You are an expert in this subject!

  2. Whoa! This weblog looks just like my old 1! It is on a entirely different topic but it has pretty significantly exactly the same layout and style. Outstanding choice of colors!

  3. Wow, incredible weblog layout! How long have you been blogging for? you make blogging appear straightforward. The overall appearance of your web site is excellent, as proper as the content material!

Trackbacks

  1. … [Trackback]…

    [...] Informations on that Topic: icodeforu.com/removing-genesis_post_info-from-a-single-category/ [...]…

Speak Your Mind

*