Home › Forums › Back End › is_front_page returning false › Reply To: is_front_page returning false
February 26, 2015 at 9:23 am
#196870
Senff
Participant
Obviously, it’s getting class GATSBG1 because of your home page matches this condition:
is_page (array('the-great-american-trucking-show', 'gats-galleries', 'gats-winners' )) || in_category('gats'))
And so it will skip checking all the other conditions (including the check if it’s the home page).
If you want to set it to “none” on the home page no matter what, then you should start your entire check with that condition:
if ( is_front_page()) {
echo 'class="none" ';
} else {
// all your other stuff here
}