how to use different sidebar for some pages?
-
Hi,
I would like to use different sidebars for different pages. Right now my page template looks like this: (left.php is my sidebar)<?php get_header(); ?> <?php include(TEMPLATEPATH."/left.php");?> <div id="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?> </div> <?php endwhile; endif; ?> </div> <?php include(TEMPLATEPATH."/right.php");?> <?php get_footer(); ?>
What do I have to do so that when I navigate to https://url.com/?page_id=4, it will show not ‘left.php’ but ‘left_2.php’
Hope someone can help me. Thank you!
do77
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘how to use different sidebar for some pages?’ is closed to new replies.