WP_Query post__not_in parameter ignored for sticky posts
|Reported by:||tidywebdev||Owned by:|
If you specify an array of post IDs for the postnot_in parameter when doing a custom query using a WP_Query object, the posts will still be returned if they are sticky.
The only way to avoid this is to also include the caller_get_posts=1 parameter, which stops the sticky posts appearing at the top of the post list, thus losing some of the sticky functionality.
Change History (5)
- Milestone changed from Unassigned to 2.9
- Resolution set to fixed
- Status changed from new to closed
- Cc itxitx added
- Resolution fixed deleted
- Status changed from closed to reopened
- Version changed from 2.8.6 to 2.9.2