conditional statements

If is not any of these

Here we check that the page is not one of the “masterplan pages” or any of the singular pages from our custom post type ‘property’. Note the bracket positions are slightly weirder then you may expect.

If is post id

In this case we have used it for Woocommerce product (custom post type) id. Great for excluding individual or an array of products from your function.


This has never worked properly. I’m using jQuery instead to apply a class to the content div if the sidebar exists.


Lots of trouble getting this to return true on pages that where using archive.php.

I had much greater success using

Comments are closed.