#11197 closed defect (bug) (fixed)
WP_Query post__not_in parameter ignored for sticky posts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | low |
Severity: | minor | Version: | 2.9.2 |
Component: | General | Keywords: | sticky WP_Query |
Focuses: | Cc: |
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)
#1
@
15 years ago
- Milestone changed from Unassigned to 2.9
- Resolution set to fixed
- Status changed from new to closed
#2
@
15 years ago
- 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.
Note: See
TracTickets for help on using
tickets.
This seems to have been fixed in 2.9.