#11197 closed defect (bug) (fixed)
WP_Query post__not_in parameter ignored for sticky posts
| Reported by: | tidywebdev | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 3.0 |
| Component: | General | Version: | 2.9.2 |
| Severity: | minor | Keywords: | sticky WP_Query |
| Cc: | Focuses: |
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)
#2
@
16 years ago
- Cc added
- Resolution fixed
- Status closed → reopened
- Version 2.8.6 → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This seems to have been fixed in 2.9.