Issue: WordPress sticky posts always on top instead of being incorporated in the default descending date sort for blog home

Share

I am using WordPress 3.1, I was able to solve this issue by customizing the call to the query_posts() function in my theme’s home.php file.

The only customization necessary was adding the ignore_sticky_posts variable at the end of the query string as illustrated below.

Current code in my theme:

query_posts($category."&paged=$paged&showposts=$number_posts");

Tweaked code:

query_posts($category."&paged=$paged&showposts=$number_posts&ignore_sticky_posts=1");

Tags: , ,

Leave a Comment