[wp-trac] [WordPress Trac] #63307: REST API: Returns incorrect post when querying by slug if sticky posts exist

WordPress Trac noreply at wordpress.org
Fri Apr 25 10:57:09 UTC 2025


#63307: REST API: Returns incorrect post when querying by slug if sticky posts
exist
-------------------------------------------------+-------------------------
 Reporter:  wpmudevsupport13                     |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.8.1
Component:  REST API                             |     Version:  6.8
 Severity:  critical                             |  Resolution:
 Keywords:  changes-requested has-testing-info   |     Focuses:  rest-api
  has-unit-tests dev-feedback has-patch          |
-------------------------------------------------+-------------------------

Comment (by karthikeya01):

 > https://github.com/WordPress/wordpress-develop/pull/8713 - I don't think
 this is feasible since it will cause sticky posts to need to be explictly
 requested which is a change in behavior (it's a bit concerning that no
 tests failed though)

 I want to add that until 6.7.2 the REST API doesn't include sticky posts
 on top. It used ignore_sticky_posts=1 for all `get_items` requests.

 Introducing sticky posts also causes issues in pagination mentioned in the
 ticket https://core.trac.wordpress.org/ticket/63339

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


More information about the wp-trac mailing list