1 vote

How to use parse_query() to add an additional filter based on content to page search?

There is only one parameter that will filter your results to posts that contain a value in the content, s aka search, but doing so would break the search box. Unless you write code that on save ...
Tom J Nowell's user avatar
  • 59.2k
1 vote

Pre_get_comments and orderby comment_karma

I think you're close with your 2nd snippet, but you should be using meta_value_num instead of meta_key_num. $query->set( 'meta_key', 'comment_karma' ); $query->set( 'orderby', 'meta_value_num' )...
Pat J's user avatar
  • 11.8k

Only top scored, non community-wiki answers of a minimum length are eligible