php conditional statement: not equal to operator
问题 I am trying to do the following with wordpress : "If is NOT page 92, OR page parent is NOT 92." Here is what I have: <?php if (!is_page(92) || $post->post_parent !== 92) { echo $foo; } ?> If I use one or the other as condition, it works; When I add the second condition, it breaks. Any help would be well appreciated. Cheers! 回答1: Your problem is probably in using || instead of &&. You want it to echo if you are not on page 92 AND you are not in a subpage of page 92. Let's say you're on page 92