Forum Replies Created

Viewing 1 replies (of 1 total)
  • I second this problem.

    $args = array(
       'post_type' 		=> $post_type,
       'category__and'  => $filters, //filters array
       'meta_query' 	=> array(
           						array(
           						    'key' => 'product_category_filter',
           						    'value' => $category_ids, //array
           						    'type' => 'numeric',
           						    'compare' => 'LIKE'
           							)
           						),
    
    );
    
    $filtered_search = new WP_Query($args);

    Warning: trim() expects parameter 1 to be string, array given in …

    I’ve tried other compare values: ‘=’, ‘IN’, and ‘EXISTS’ as well.

    I’m basically using the same code as from the documentation

    Sorry, I can’t post a link to the site, it’s under development.

    Any help would be appreciated! Thanks

Viewing 1 replies (of 1 total)