Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

acrane on "is_tree not working as expected"

$
0
0

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 all articles
Browse latest Browse all 8245

Trending Articles