Home › Forums › Add-ons › Repeater Field › How to get title for multiple links(PageLink) › Reply To: How to get title for multiple links(PageLink)
the “Page Link” field only returns URLs. get_the_title()
requires a Post ID as input. You could possibly use this https://codex.wordpress.org/Function_Reference/url_to_postid to get the Post ID, however, the page link field also lets you select archive pages and there is no way in WP to convert these URLs or get the title of the page. The page link field was not really designed to do what you’re trying to do. The Post Object field, or relationship field might be a better choice.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.