[wp-hackers] When WP should return sticky posts (was: styling stick posts)

John Blackbourn johnbillion+wp at gmail.com
Tue Nov 4 17:25:01 GMT 2008

It's been noted by Nathan Rice and MichaelH that when using
query_posts() to perform custom queries, sticky posts are returned
when they shouldn't be.

Returning sticky posts when parameters such as post__in, post__not_in,
and custom field keys/values are explicitly defined is definitely not
intended behaviour.

As per the suggested design on ticket 7457 [1], I suggest that sticky
posts should only be returned on the home page and also possibly on
the category archive for any category that the sticky post is in.

Anywhere else that you think sticky posts should be returned? How
about at the top of search results when the sticky post(s) contains
the search term?

[1] http://trac.wordpress.org/ticket/7457


More information about the wp-hackers mailing list