WordPress.org

Ready to get started?Download WordPress

Forums

Conditionally remove Post Info by category (3 posts)

  1. achase409
    Member
    Posted 11 months ago #

    I want to remove post info on all posts & category archives except for the 'News' category. I can do it easily in the CSS, but I am wondering why my PHP function is not accomplishing this task.

    Here is my code:

    add_action('genesis_before_post_content','remove_info_by_category');
    function remove_info_by_category() {
        if ( !is_category('News') || !in_category('News') ) {
            remove_action( 'genesis_before_post_content', 'genesis_post_info' );
        }
    }

    Any advice?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 11 months ago #

    I'm sorry but as you are using a commercial framework, you need to seek support from the theme's developer/vendor. We do not support commercial products here.
    Try http://www.studiopress.com/support

  3. achase409
    Member
    Posted 11 months ago #

    Ahh okay.

Reply

You must log in to post.

About this Topic