Opened 3 years ago
Closed 3 years ago
#11246 closed defect (bug) (duplicate)
Sticky Posts ignore post__not_in
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Query | Version: | 2.9 |
| Severity: | minor | Keywords: | |
| Cc: |
Description (last modified by markjaquith)
Doing a custom WP_Query on the is_home() page can result in sticky posts appearing in your result, even if you specifically excluded them with post__not_in
Sticky posts should honor post__not_in.
Change History (4)
comment:1
markjaquith — 3 years ago
- Description modified (diff)
Post 12 is sticky.
In index.php, added this code:
$posts = get_posts(array('post__not_in' => array(1, 12)));
$posts doesn't contain the post with ID 12, even though it's sticky.
Note: See
TracTickets for help on using
tickets.

See: #11197 - claims fixed in 2.9?