is_tree not working as expected
-
Has anyone run into the problem with the is_tree function that having an else will not work? If I delete the last else statement so that it cannot take on a last variable, it works as expected.
if (is_tree(33)) { $logoClass = 'logo-yellow '; $nav = "conway"; } elseif (is_tree(35)) { $logoClass = 'logo-red '; } else { // if is something else $logoClass = 'logo-blue'; }
I am using both
<?php wp_reset_query(); ?>
<?php wp_reset_postdata(); ?>before the call…. trying to make sure a query isn’t interfering.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘is_tree not working as expected’ is closed to new replies.