I’ve got that in my functions.php and can now see it in the ACF field settings, and I can add it to my custom post type but…
I’m adding it to a button element in Elementor and although the button works as a link it displays the link text as the button text.
Knowing zero about php, I assume there is a way to add an attribute to the script so that I can input link text to be displayed rather than default to the link itself?
As an aside, the ACF support came back to and said to use the Link rather than URL field type in the Field Group. Although this works nicely to allow me to add the link to the custom post in a normal WP way, including having the option for the URL and link text that I’m looking for… I can find no way to add this new Link field as a dynamic element in Elementor, as that Link field just does not show as a dynamic field available to me. I’ve gone back to them, but currently your scripted suggestion is providing me the most progress.
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!