I’m trying to create a condition in WordPress that only calls the wp_head()
on all pages except for the “About Us” page and “News Articles” pages. Here’s the code:
<?php if (!is_page('about-us') || !is_page('news-articles')) {wp_head();}?>
It seems to work great when I only use the command for one of the pages, but using an operator seems to mess things up. In some cases the pages load correctly, but the desired results are not happening. I’ve also double-checked to make sure that I’m referencing the pages correctly, and I’m confident that I am.