!is_page( ) not working when using OR ‘ || ‘
-
I am trying to use the !is_page() function to exclude certain pages from using a bit of code in the sidebar.
This works:
<?php if (!is_page(8)) { ?>
-code here-
<?php } ?>
However when I try to add other pages using the OR function like this it does not work:
<?php if ((!is_page(8)) || (!is_page(6))) { ?>
-code here-
<?php } ?>
I have also tried this:
<?php if (!is_page(8) || !is_page(6)) { ?>
-code here-
<?php } ?>
Neither of them will work. Does anyone know how to fix this?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘!is_page( ) not working when using OR ‘ || ‘’ is closed to new replies.