Home › Forums › Front-end Issues › Help Please: Page Links with Page Title › Reply To: Help Please: Page Links with Page Title
Hi @azuremarcom
It is never smart to assume functionality. The code:
get_field('related_products', 'id')
will not work. Please always read the documentation which has been written for you to understand what parameters are available.
The page link field is very basic and will only return a url, nothing more. If you wish to get the title as well, you will need to change the field type to post_object. This will use the same data as page_link (so you will not lose any data) but your code will obviously have to change to allow for the new returned data.
Please read the docs to learn more about this field type
Thanks
E
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.