I want to check if current page match at least one of two conditions. I don't want to show js code into about page and into 404 page. For the rest of my pages i show the js code. So, I use ((!is_page(element1) AND !is_page(element2)) then show the js code. Element1 is a slug of one specific page and element2 is 404.php page. I don't know the slug or name of 404 page to indicate in if statement.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
||||
| show 1 more comment |
|
I think this would do :
|
||||
|
|
|
A 404 page probably doesn't have a Now,
Will trigger if page-slug == element1 is loaded or if a page is loading that uses |
|||
|
|
element1.phpand a404page in the same time ? It's one or the other - 404 is by definition a 'ressource not found' so it does not use any template but the 404.php template. – Simon Feb 5 at 22:21ORstatement. – Simon Feb 5 at 22:39||, as @Simon originally had it, not an&&. This is going to lead to a lot of confusion. Please clean up the question. – s_ha_dum Feb 5 at 22:39