I'm trying to filter (in the admin panel) by a custom field that is part of a checkbox group.
So the checkbox group could contain "one" or "one,two" (for example)
I found some code that allows me to filter an exact match (like "one" ), but I'd like to be able to have a value box that takes "two" as a parameter, and will find any post that is part of that checkbox group (like "one,two").
I think I'm close, but I'm off on my syntax (I think).
This is inside of a filter function that takes a $query as a parameter.
The essence is that I'd like the query to resemble:
select * where key=field_name and value LIKE field_value
Based on an article that Otto wrote, I have this...
$query = wp_parse_args($query_string); $query['meta_query'] = array( array( 'key' => $_GET['FIELD_NAME'], 'value' => $_GET['FIELD_VALUE'], 'compare' => 'LIKE', ), );
Thoughts, ideas ?