change menu item background
-
I need to change the background of a menu item (with li tag) if the user is in a specified category. I’ve allready got a little bit of code going to check if the user is in the specified category but now I need to change the background image.
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if ( in_category('26') ) { ?> <!-- THE CODE FOR BACKGROUND IMAGE --> <?php } else { ?> <?php } ?> <?php endwhile; else: ?> <?php endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘change menu item background’ is closed to new replies.