Thursday 6 March 2014

Wordpress - how to not display something in the header if template is X

What I had is a template that is displaying an featured image in the header .  However if the page is from a certain category I want to exclude this image from being show.


What you need is the is_page_template feature
 

if( !is_page_template('prod-category.php')) {

// show image

}

No comments: