Home Forums ACF PRO Acf repeater field meta query


Acf repeater field meta query

  • I want to live search the posts with meta query in it.
    There are repeaters inside the repeater field like

    Post Type: Post
    Level1 Repeater: Level1
    Level1 Sub field repeater(Level 2) : Level 2
    Level 2 repeater subfields: description, title, number

    I want a query to show the post by matching the provided search text like ‘co’, which search the post title, the subfield description, and number and returns the matching post.
    Is there any way to achieve this?
    Below is my query show far.

    $post_meta_args = array();
    if ( is_array( $myValues ) || is_object( $myValues ) ) {
    foreach ( $myValues as $value ) {
    array_push( $post_meta_args, array(
    'key'     => 'description',
    'value'   => 'mar',
    'compare' => 'LIKE'
    ) );
    $args = array(
    'post_type'      => 'post',
    'posts_per_page' => - 1,
    's'              => 'co',
    'meta_query'     => $post_meta_args
    // query
    $the_query = new WP_Query( $args );
  • Any thing on this?

Viewing 2 posts - 1 through 2 (of 2 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.