conditional IF ELSE statements not working
-
I can’t get my conditional statements to work correctly. Is there a better way of doing this?
<div class="sidebar"> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php if ( is_page('homepage') ) { include (TEMPLATEPATH . '/homesidebar.php'); } else { include (TEMPLATEPATH . '/standardsidebar.php'); } ?> <?php if ( is_page('about') ) { include (TEMPLATEPATH . '/aboutsidebar.php'); } else { include (TEMPLATEPATH . '/standardsidebar.php'); } ?> <?php if ( is_page('contact') ) { include (TEMPLATEPATH . '/contactsidebar.php'); } else { include (TEMPLATEPATH . '/standardsidebar.php'); } ?> </div> <!-- END SIDEBAR -->
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘conditional IF ELSE statements not working’ is closed to new replies.