The latest release of the free WordPress plugin Redirect URL to Post adds three new parameters to filter posts by comments:
comment_count
, comment_count_min
, comment_count_max
Values are integers. comment_count
also accepts negative values (even-0
), which means “not x”.
- Have no comments:
comment_count=0
- Have comments:
comment_count_min=1
orcomment_count=-0
- Have <= x comments:
comment_count_max=x
- Have >= x comments:
comment_count_min=x
If you need < and > instead of <= and >=, you simply use x-1 or x+1.