0
votes

Hoping for some help with an ACF issue. I am trying to show some data from an ACF field in a custom taxonomy on a post.

<div class="test_data">
                            <?php $terms = get_the_terms( $post->ID , 'reederei' );
                                $taxID = $term->term_id;
                                $termsNumber = the_field('terms_conditions');
                               ?>
                            </div>
                            <div class="test_info">
                            <?php the_field('terms_conditions_'.$termsNumber, 'reederei_'.$taxID); ?>
                            </div>

That is what I have currently. What I ideally want is to show the fields terms_conditions_1, terms_conditions_2 etc where the 1,2,3,4,5 is pulled in from the dropdown fields ('terms_conditions').

I can get it to echo the number from the dropdown but can't make work in the field itself.

1

1 Answers

0
votes

I worked it out!!

In the var it needed to use get_field not the_field.