Hello, in the administration panel>appearance>editor, in the list of templates i have two sidebar templates:
sidebar (sidebar.php)
sidebar2.php (sidebar2.php)
This is the code at the index.php (conditional sidebar is somewhere in the middle. Thank you !!!
<?php get_header(); ?>
<div id=”content”>
<div id=”articles”>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”article” id=”post-<?php the_ID(); ?>”>
<div class=”articleMeta”>
<div class=”dayMonth”><?php the_time(‘j M y’) ?></div>
<div class=”comments”><?php comments_popup_link(‘Be first!’, ‘1 Com.’, ‘% Com.’); ?></div>
</div><!– end articleMeta –>
if (is_page(3)) {
get_sidebar(‘sidebar2’);
}
<div class=”articleBody”>
<h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
<?php the_content(‘ ‘); ?>
<div class=”readMore”>#more” rel=”bookmark” title=”Read the entire article!”>Read the entire article!</div><div class=”comenteaza”><?php comments_popup_link(‘Post your comment’, ‘One comment’, ‘% comments’); ?></div>
</div><!– end articleBody –>
<div class=”clear”></div>
</div><!–end article –>
<?php wp_link_pages(); ?>
<?php endwhile; ?>
<div class=”navigation”>
<div class=”alignleft”><?php next_posts_link(‘« Older articles’) ?></div>
<div class=”alignright”><?php previous_posts_link(‘Newar articles »’) ?></div>
<div class=”clear”></div>
</div>
<?php else : ?>
<div class=”article”>
<div class=”articleMeta”>
<div class=”dayMonth”> </div>
<div class=”category”> </div>
<div class=”comments”> </div>
</div><!– end articleMeta –>
<div class=”articleBody”>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn’t here.</p>
</div><!– end articleBody –>
<div class=”clear”></div>
</div><!–end article –>
<?php endif; ?>
</div>
</div><!– end content –>
<?php get_sidebar(); ?>
<?php get_footer(); ?>