Specific category posts not working in sidebar
-
I am having dificulty on one project with the following code. The end result is the proper excerpt and read more links but the title for each of the two posts comes from yet another post in another category.
Who can figure this one out?
<div class="sidebar_box2" id="articlesTab"> <div class="mores"><p><a href="<?php next_post_link('%link', '', TRUE); ?>">More »</a></p></div> <ul> <?php query_posts('category_name=fp&showposts=2'); //$do_not_duplicate = $post->ID; if (have_posts()) : while (have_posts()) : the_post(); //if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?> <li> <a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>"><?php echo $title ?></a> <p class="text"><?php the_excerpt(); ?></p> </li> <?php endwhile; endif; ?> </div>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Specific category posts not working in sidebar’ is closed to new replies.