Support

Account

Home Forums ACF PRO How to get the repeater's sub domain multiple selection data?

Unread

How to get the repeater's sub domain multiple selection data?

  • I facing a problem here, my repeater having one layer but with few sub domain inside it, also I set one of the sub domain can be select multiple times, I tried to use get get_sub_field() but it always displaying “Array” instead of displaying all of the selection while I turned on the “multiple selection”.

    Here’s the code (researches is the layer field name and slug is the one I mentioned with multiple selection):

    ` <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php

    if(have_rows(‘researches’)):while(have_rows(‘researches’)):the_row();

    $array = get_sub_field(‘slug’);
    ?>
    <span> <?php echo $array; ?> </span>

    <?php endwhile;
    endif; ?>
    <?php endwhile;
    endif; ?>`

    I attached my setting below for better overall picture,
    I hope someone can helps, thanks!

Viewing 1 post (of 1 total)

The topic ‘How to get the repeater's sub domain multiple selection data?’ is closed to new replies.