1

Also the same question as here: Add filter menu to admin list of posts (of custom type) to filter posts by custom field values

But need to search by selecting meta_key and searching by meta_value but not exact value. Tried to use %search_string% or search_string didn't helped. Any suggestions? (Need to add LIKE param somewhere)

-1

Just add:

$query->query_vars['meta_compare'] = 'LIKE';
  • Please explain why that helps (and also take a look at the formatting options with the WYSIWYG editor). – kaiser Jul 3 '15 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.