Home Forums Add-ons Repeater Field WP Query if Sub Field exist


WP Query if Sub Field exist

  • Hi everyone,

    i have created with ACF an Repeater Field, called “videos” for my CPT “company”.
    In this Repeater Field i have one Field, called “video” for a youtube Link.

    Now I’d like to show with a Query all Companys who has a sub field created with an video link.

    I try it with this code:

    $itemArgs = array(
    'post_type'             => 'company',
    'pagination'            => false,
    'posts_per_page'        => '-1',
    'meta_query'            => array(
    'key'       => 'videos_%_video',
    'value'     => 'http://',
    'compare'   => 'LIKE',

    Has anyone a Idea to solve the problem?

    Thanks a lot,

  • Hi @fried-dbm

    Please take a look at section 4, Sub custom field values, of this page:

    I hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.