Reply To: Custom template for Single post

Home Forums Support Custom template for Single post Reply To: Custom template for Single post

#234068
Tom
Lead Developer
Lead Developer

That’s a bit harder, but you should be able to do this:

add_action( 'after_setup_theme','tu_category_specific_page_header' );
function tu_category_specific_page_header() {
    // Only do this if we're in category IDs 1, 2 and 3
    if ( in_category( array( 1,2,3 ) ) ) {
        remove_action('generate_after_header','generate_page_header_single_above', 10);
        add_action('generate_after_entry_header','generate_page_header_single_below_title', 10);
    }
}