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);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
📣 “ACF Chat Fridays”— Advanced Custom Fields (@wp_acf) January 31, 2023
The ACF team holds their first open office hours this Friday! Come and talk ACF, and ask questions about building sites with the plugin.
We’d love to see you there!
📆 Friday 3rd Feb - 3pm UTC
👉 Register here - https://t.co/3UtvQbE4CU pic.twitter.com/oTwW9K1XQ0
© 2023 Advanced Custom Fields.