Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

filter using meta_query

$args = array(
  'post_type' => 'product',
  'product_cat' => $food_category->slug,
  'meta_query' => array(
     array(
        'key'     => '_location',
        'value'   => '%"newyork"%', // note the quotes
        'compare' => 'LIKE',
     ),
   ),
 );
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #filter
ADD COMMENT
Topic
Name
5+4 =