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)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.