unique sidebar for pages
-
hey everyone!
i was wondering if you could help me with this little problem.
currently i have this code in page.php<?php if ( is_page(‘encountering-conflict’) || $post->post_parent == ‘194’) { ?>
<?php include(TEMPLATEPATH.’/sidebar-enc.php’);?><?php } else { ?>
<?php include(TEMPLATEPATH.’/sidebar-alt.php’);?>
<?php } ?>now i would like to add in another conditional tag for another page. So I’d like another unique sidebar for a different page. How would i go about doing this?
for example, something like:
<?php if ( is_page(‘encountering-conflict’) || $post->post_parent == ‘194’) { ?>
<?php include(TEMPLATEPATH.’/sidebar-enc.php’);?><?php if ( is_page(”) || $post->post_parent == ‘##’) { ?>
<?php include(TEMPLATEPATH.’/sidebar-OTHERSIDEBAR.php’);?><?php } else { ?>
<?php include(TEMPLATEPATH.’/sidebar-alt.php’);?>
<?php } ?>however, i know this code does not work because i’ve tried it. does anyone know how to code for what i’m trying to do?
i’m sorry if this is confusing…
- The topic ‘unique sidebar for pages’ is closed to new replies.