Support

Account

Home Forums General Issues Display the Text Label from a Page Link Reply To: Display the Text Label from a Page Link

  • Your code and your explanation are a bit confusing. You’re using the_sub_field(), but there is no repeater loop. Are these fields part of a repeater? You’ll need to look at this http://www.advancedcustomfields.com/resources/the_sub_field/, there is an example of a repeater loop there.

    It you want to show the title of a page that goes along with a page link field, this can be done by getting the field without formatting it. This should return the post ID and then you’ll need to get the permalink for the page and the title yourself. for more information on this see http://www.advancedcustomfields.com/resources/get_field/

    
    $page_link_id = get_field('page_link_field', false, false);
    echo get_the_title($page_link_id),'<br />',
           get_permalink($page_link_id);