<?php if( is_home() || is_page(10)): ?> <div class="text-center col-xl-12 col-lg-12 col-md-12 col-sm-12 col-xs-12"> <?php elseif(is_single() && !is_page(10)): ?> <div class="text-center col-xl-9 col-lg-9 col-md-9 col-xs-12"> <?php endif; ?>
All I’m trying to do is change the classes assigned to this
I’ve tried is_page(‘Contact’), is_page(‘contact’), and is_page(10)
None of them seem to return true in any case, I even deleted all other conditionals and just had it print something if its the contact page, but it still doesn’t return true and has no effect.
I’ve done a lot of searching and all I can find says I’m using it correctly.. I’m at a loss as to why it wouldn’t return true?
Am I using php if statements incorrectly and it’s been an ‘oops, it worked’ scenario thus far?
The url to the page ends with ?page_id=10, the page is titled ‘Contact’
Read more here: WordPress ignoring is_page() conditional