Support

Account

Home Forums General Issues Post type attachment and acf-field relation

Helping

Post type attachment and acf-field relation

  • Hi!

    I have a repeater which i set a wrapper attribute id for it and now i would like to retrieve it through a query. The repeater has sub field type file. This is my acf structure and query

    group1 (type group)
    --add file 1 (type repeater)
    ----add a new file
    group2 (type group)
    --add file 2 (type repeater)
    ----add a new file ( type file) 
    $arg = array(
        'post_type' => 'attachment',
        'post_id'       => $post_id,
    );
    
    $getPost = get_posts($arg);
    

    The wrapper id is stored in a post content of a acf-field post type and i cannot find any relation between it and its attachment.

  • There is no relationship between the wrapper ID and the content of the field. The wrapper ID is only used when outputting the HTML of the field group in the admin.

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.