Support

Account

Home Forums Add-ons Repeater Field Linking to specific repeater subfields Reply To: Linking to specific repeater subfields

  • ohhh closer

    this works except the permalink is outside of the link

    	<ul>
    				<?php
    				$i = 1;
    				while(has_sub_field('question_answer')):
    				echo '<li><a href="' . the_permalink() . '/item-' . $i . '">' . get_sub_field('question') . '</a></li>' ;
    				$i++;
    				endwhile;
    				?>
    				</ul>

    This does not display anything….

    <ul>
    				<?php
    				$i = 1;
    				while(get_sub_field('question_answer')):
    				echo '<li><a href="' . the_permalink() . '/item-' . $i . '">' . get_sub_field('question') . '</a></li>' ;
    				$i++;
    				endwhile;
    				?>
    				</ul>