Category Page Displaying All Category Posts
-
I have two loops running on my theme. The first is to pull all sticky posts and the second is to pull all remaining non sticky posts.
I was able to get this working but unfortunately when I try and view the category page it disregards them and displays all the posts as they would appear on the index.
So for example I have categories Apples, Oranges, and Plums. On the index all of them show up as they should with the stickies at the top and the rest below. But when I view the Apples category page I get the stickies at the top and the rest of the posts below but it is still pulling them from Oranges and Plums.
The only parts of the them I modified were adding a second loop and the two query posts below.
To call the sticky posts:query_posts(array(‘post__in’=>get_option(‘sticky_posts’), $query_string . ‘orderby’=>rand));
The Rest of my Stuff:
<?php rewind_posts(); ?>
<?php wp_reset_query(); ?>Final Query to call the rest.
$sticky=get_option(‘sticky_posts’);
$args=array(‘caller_get_posts’=>1,
‘post__not_in’ => $sticky,
‘orderby’=>rand,
);
query_posts($args);If you see anything that would allow category sorting pages to work again that would be so amazing. I have spent hours looking this over to no avail 🙂
The topic ‘Category Page Displaying All Category Posts’ is closed to new replies.