sidebar posts
-
I am developing a theme with posts in the right sidebar under category ‘SIDEBAR’. The sidebar posts show an image and a short desription followed by the <!–more–> insert.
The main posts are under category ‘CENTRE’ and also use the <!–more–> insert.
Unfortunately If I click to read a centre post, or sidebar post (single.php) the sidebar posts now display the complete contents.
How can I stop this from happeningmain pages:
<?php query_posts(‘category_name=centre’);
php if (have_posts()) : php while (have_posts()) : the_post(); ?>stuff here
<?php endforeach; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
<?php endif; ?>Sidebar:
<?php query_posts(‘category_name=sidebar’);
php if (have_posts()) : php while (have_posts()) : the_post(); ?>stuff here
<?php endforeach; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
<?php endif; ?>Thanx
- The topic ‘sidebar posts’ is closed to new replies.