Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End is_front_page returning false Reply To: is_front_page returning false

#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
}