#11197 closed defect (bug) (fixed)
WP_Query post__not_in parameter ignored for sticky posts
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 3.0 |
| Component: | General | Version: | 2.9.2 |
| Severity: | minor | Keywords: | sticky WP_Query |
| Cc: | itxitx |
Description
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
not fixed in wp 2.9.2
the behavior is:
if we have some sticky posts then set post__not_in parameter with one or two or more sticky post ID, instead excluding them from posts, it only changes the order of sticky posts.
- Resolution set to fixed
- Status changed from reopened to closed
Note: See
TracTickets for help on using
tickets.

This seems to have been fixed in 2.9.