[wp-trac] [WordPress Trac] #63130: Add comment_count Support to REST API for Enhanced Sorting and Gutenberg Integration

WordPress Trac noreply at wordpress.org
Thu Mar 20 08:31:57 UTC 2025


#63130: Add comment_count Support to REST API for Enhanced Sorting and Gutenberg
Integration
-------------------------+-----------------------------
 Reporter:  vipulpatil   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  trunk
 Severity:  blocker      |   Keywords:  needs-patch
  Focuses:  rest-api     |
-------------------------+-----------------------------
 Currently, the REST API does not support sorting posts by comment_count,
 which limits the ability to retrieve posts ordered by the number of
 comments. Adding comment_count support to the REST API will achieve two
 key objectives:

 **Enable Sorting by Comment Count in the REST API**
 Adding this feature will allow developers to sort posts by the number of
 comments directly in the REST API, enhancing the flexibility of post
 queries.

 **Integrate Comment Count Sorting into Gutenberg’s Latest Posts Block**
 Once the REST API is updated, this functionality can be leveraged to
 enhance the Latest Posts block in Gutenberg. The ability to sort posts by
 comment count was discussed in Gutenberg Issue #20046, and this feature
 was identified as missing in Revision 2 of the block.

 This enhancement will provide users with a more dynamic way to display
 popular or highly engaged content while maintaining consistency between
 REST API capabilities and Gutenberg features.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63130>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list