Problems with showing posts from specific category
-
Hi!
I’m showing 8 latest posts from category called “arvostelut” (reviews, in english) on top of my site (I mean top of every page). It works great, but when i want to see one full-story in single.php it shows me all the eight reviews besides the one I would like to see.
So kinda the php query continues to the content even though I would not want that.
Here’s the code i use to show the 8 latest reviews.
<?php if (have_posts()) : ?> <?php query_posts('category_name=arvostelut&posts_per_page=8'); ?> <?php while (have_posts()) : the_post(); ?> <div class="etusivu_arvostelu"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?> </a></div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>btw. it doesn’t matter whether I have this code in header.php or in index.php, single.php, archieve.php etc.
Thank you very much for your help!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘Problems with showing posts from specific category’ is closed to new replies.