Support

Account

Home Forums Add-ons Repeater Field Using Post ID in permalink Reply To: Using Post ID in permalink

  • Use get_sub_field() instead of the_sub_field().

    the_sub_field() echos the value instead of returning it.

    
    <?php $postid = get_sub_field('post_id') ?>						
    <a href="<?php echo get_permalink( $postid ); ?>">Link to post</a>