Support

Account

Home Forums Add-ons Repeater Field Filter taxonomies by repeater field

Unread

Filter taxonomies by repeater field

  • Hey,
    as the title of the post, I’ve to filter a custom taxonomy by custom fields, and I’ve any problems for all the fields except the repeater.
    This is my code:

    
    $args = array (
            'taxonomy' => 'taxonomy_name',
            'hide_empty' => false,
            'meta_query' => array(
              'relation' => 'AND',
              array(
              array('key' => 'field1', 'value' => 'value1, 'compare' => 'LIKE'),
              array('key' => 'field2', 'value' => 'value2, 'compare' => 'LIKE'),
              array('key' => 'field3_%_subfield', 'value' => 'value3', 'compare' => 'LIKE'),
             )
            )
          );
    
    $categories = get_terms($args);
    

    It works with field1 and field2, but it returns a blank page if I add the repeater field. I know that it’s a problem with WordPress and ‘%’, so I think I’ve to use add_filter, but I can’t use add_filter(‘posts_where’,’—‘) because I’m not filtering posts.
    Any suggestion?

Viewing 1 post (of 1 total)

The topic ‘Filter taxonomies by repeater field’ is closed to new replies.