Sticky posts not acting as expected in query_posts()
-
This is in WP 2.8.5 — that version isn’t currently available in forum dropdown.
I’m trying to make a category template, showing all the posts in one category with paging to older/newer posts. I also want sticky posts to show up first.
I had thought this was how query_posts() would work by default. Here’s the code I’m using (adapted from the codex):
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( 'category_name'=>'news', 'paged'=>$paged, ); query_posts($args); ?>
Instead of showing what I intended, this ignores the sticky characteristic and shows the posts in reverse date order. I had thought I needed to include the argument caller_get_posts set to 1 to ignore the sticky setting, but this isn’t working that way.
Am I misunderstanding the codex doc on caller_get_posts and query_posts? Or are sticky posts really not sticky?
Thanks for your help.
- The topic ‘Sticky posts not acting as expected in query_posts()’ is closed to new replies.