Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Custom Field repeater/URL output Reply To: Custom Field repeater/URL output

#5546
Tom
Keymaster

Hi there,

Give this a shot instead:

add_action( 'wpsp_after_content', 'tu_add_material' ); 
function tu_add_material() {
	if ( have_rows( 'related_material' ) ) :
		while( have_rows('related_material') ): the_row();   

			$link = get_sub_field('link');

			if ( $link ) : ?>
				<a class="related-material" href="<?php echo $link['link']; ?>" target="<?php echo $link['target']; ?>"> <?php echo $link['title']; ?> </a>
			<?php endif;
		endwhile; 		 
	endif; 
}