i want to display only posts from a certain category on main page. I was able to do it and then i had trouble where i couldnt go to the next page with navigation. I was able to solve that as well but now whenever i click on a tag in tag cloud i get the same posts from the original category query on main page. This is the code that i used to get it to work
<?php if (have_posts()) : ?> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php query_posts('category_name=drawings&paged='.$paged); ?> <?php while (have_posts()) : the_post(); ?>
when i go to the second page this is the parmalink
i guess its using the index.php page to display all the posts even the ones from tags, so can i check that a tag is being looked up and not the main page posts
- The topic ‘Pagination query_posts tags’ is closed to new replies.