WP_Query, showing specific category breaks sticky posts
-
It seems that when you make a custom query like this one, the sticky posts in category 1 will not show up first like they should.
$custom_query = new WP_Query('cat=1');
However, if you exclude other categories, the sticky posts function correctly.
$custom_query = new WP_Query('cat=-2,-3,-4');
While I want to show just the posts from category 1 in this query, excluding other categories is not an option – the customer would have to edit the query everytime new categories are created.
Any ideas how to use
WP_Query('cat=1');
and still make the stickies work? In my opinion this is a bug, or is anyone else seeing similar behaviour?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WP_Query, showing specific category breaks sticky posts’ is closed to new replies.