How to Pull in URL of ACF Page Link

I’m creating a looper pulling a custom post type called Programs. Each of those Programs have a ACF Custom Field called Page Link.


Each post in the Looper has a button I want to link to the URL of the page selected in the Page Link field

In the url field for the button, I tried adding the Meta (Custom Field) called page_selection but it only results in displaying the pages number ID rather than the url of the page.

How can I get the URL from the ACF Page Link field into my looper button?

Hi @santosfel5,

Thanks for reaching out.
You need to use {{dc:acf:post_field field="page_selection "}} to get the ACF field data within the Looper. I would suggest you go through the following article on it.

Hope it helps.
Thanks

Thank you! This was the dynamic field code I ended up using. {{dc:acf:post_field field="page_selection"}}

Hi @santosfel5,

You’re welcome! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.