Archived topic
Adding a custom field URL to a button
5 replies · Started by Jessica on July 14, 2022
Hi there! I have a custom field that's a URL field. I'm trying to add dynamic data to my button so it pulls in this URL from the custom field and takes people to the link. I want the text on the button to stay the same for all buttons ("View Website") but link to change. I'm going to Dynamic Data (once clicked in the button), Dynamic Link Type - Post Meta - and adding the field name, but I don't get a clickable button. Would love any help finding what I'm missing re: this button issue - thanks!!
Hi Jessica,
That should work. It's not "clickable" probably because it's failing to retrieve the URL from your field.
How are you adding the custom field? Make sure the meta slug is correct.
Kindly let us know.
The meta field name (under Dynamic link type) is partners_cta_button_2 and that's the name in ACF for the URL field.
Yes, I tested creating an ACF URL field on my test website, and retrieve it through a Buttons Block dynamic link, and I was able to make it work as expected.
Here’s my setup:
https://share.getcloudapp.com/YEuk4rbm
https://share.getcloudapp.com/z8umbLRd
https://share.getcloudapp.com/kpu8lJvg
Can you check if you’ve created and retrieved the field similarly?
Just realized I never closed this one out, sorry! Your resources helped - I was using the little three circle stacked button in the block settings within the block rather than the enable dynamic data settings in the right side block menu. Using the right side block menu it worked perfectly - thanks Fernando!
You're welcome Jessica!