[wp-trac] [WordPress Trac] #55207: WP_Query returns published sticky posts when post_status is set to draft

WordPress Trac noreply at wordpress.org
Sun Feb 20 14:33:21 UTC 2022


#55207: WP_Query returns published sticky posts when post_status is set to draft
--------------------------+------------------------------
 Reporter:  NomNom99      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  5.9
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by NomNom99):

 **EDIT:**

 If this is the intentional behavior, then it would really be helpful to
 explicitly mention on the [documentation
 page](https://wordpress.org/support/article/sticky-posts/) that sticky
 posts will be returned by `WP_Query` for all post statuses. The current
 behavior can be confusing to users who are unfamiliar to this feature.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55207#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list