Home Forums ACF PRO Tabs with ACF pro


Tabs with ACF pro

  • Hi guy!
    I still to have problem for create dynamic tabs with ACF pro.
    I not understand how is possbile with php code.
    There is some plugin i can watch?
    Thanks very much to everybody.

  • Have you tried exporting a field group with tab fields in it? To generate tab fields in PHP you need to create the field array that looks like an exported tab field. It’s really the same as any other field, you just have to make sure you supply the right values.

    Exactly what is it that’s confusing you?

  • I try to use one example find in this forum, but i have problem.
    I attach all screenshot in order.

    This is code i add in php

    <ul class=”nav nav-tabs” role=”tablist”>
    <li role=”presentation” class=”active”>Home
    <?php if ( have_rows(‘repeater’, ‘option’) ) {
    while ( have_rows(‘repeater’, ‘option’) ) : the_row();
    $image = get_sub_field(‘repeater_subfield1’, ‘option’ );
    if($image) {
    <li role=”presentation”>Profile
    <?php } } ?>

    <!– Tab panes –>
    <div class=”tab-content”>
    <div role=”tabpanel” class=”tab-pane active” id=”home”>Home Text</div>
    <div role=”tabpanel” class=”tab-pane” id=”profile”>
    <?php while ( have_rows(‘repeater’, ‘option’) ) : the_row(); ?>
    <div class=”col-sm-2 col-xs-6 color_showcase text-center”>
    ” alt=””>
    <?php the_sub_field(‘repeater_subfield2’); ?>
    <?php endwhile; ?>

  • ah, you’re looking for tabs in the front end, I thought that you were looking to dynamically create fields and add them to acf field groups.

    Can you re-post the code in your previous post using the forum code tags. It’s not readable the way it is. It looks like you might have some nesting errors, but I can’t be sure.

    Also, can you supply a link to the place you found the code to begin with?

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

The topic ‘Tabs with ACF pro’ is closed to new replies.