WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 18 months ago

#25180 new enhancement

Make it possible to select only posts with comment_count > 0

Reported by: wonderboymusic Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.6
Component: Query Keywords:
Focuses: Cc:

Description

May need this when #11398 goes in.

Change History (4)

comment:1 @nacin21 months ago

Specifically this IRC discussion: http://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2013-08-29&sort=asc#m677727

For #11398, you can order by comment_date. The problem being, any posts without comments are fetched and stuck at the bottom.

That ORDER BY plus WHERE comment_count > 0 means we get only posts with comments. Though at that point it would be cheaper to convert to the LEFT JOIN to an INNER JOIN.

comment:2 @DrewAPicture20 months ago

This seems more like an enhancement. @wonderboymusic: Any plans to proceed with this?

comment:3 @johnbillion20 months ago

  • Milestone changed from 3.7 to Future Release
  • Type changed from defect (bug) to enhancement

Dependent on #11398.

comment:4 @SergeyBiryukov18 months ago

  • Version changed from trunk to 3.6
Note: See TracTickets for help on using tickets.