Sidebar Problem
-
I am doing a design for my site and i do not get entries on my index page but on the sidebar i get the latest 2 entries with the first 25 words and a link to read on a entry but when i click on the entries page link, the page do not display the latest 2 post on the sidebar. I want it to show the post and on the sidebar show the other 2 posts how can can i get it done? below is the code to get the latest 2 post with the first 25 words
<div id="update"><div class="updateheader"><strong>Updates</strong></div>
<?php } ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php $temp_query = $wp_query; ?>
<?php $my_query = new WP_Query('category_name=special_cat&showposts=2'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php endwhile; ?>
<strong><?php the_title(); ?></strong><br>
<small><?php the_time('F jS, Y') ?></small>
<?php the_excerpt_reloaded(20); ?><br>
<div class="updateheader"><strong><a>" rel="bookmark" title='Permanent Link to'>Read More</a><br></strong></div>
<?php endwhile; else: ?>
Sorry, no posts matched your criteria.
<?php endif; ?>
The topic ‘Sidebar Problem’ is closed to new replies.