Home Forums General Issues Button Linked Using URL Field


Button Linked Using URL Field

  • I have a button, pulling its text from ACF text field, works perfect. I need to set a link to this button that I would like to be pulled from the ACF URL Field.

    When I assign the link to the button, by choosing ACF URL Field and the proper key, if I hover the cursor over button while still in the editor, the button rolls and the proper link url shows up in bottom left corner of screen, as it should.

    But when updating and checking live site, the button is dead. The text is still there, pulled correctly. But the button isn’t clickable.

    When I remove the URL Field as the link source, and choose Post URL or Site URL or even just physically type any url, the button works perfect on live site and goes to correct url.

    But if I set the button’s link as the ACF URL Field it renders the button useless.

  • Exactly how are you adding the url to the href of the link?

  • In the button widget, I click the dynamic icon in the Link area, choose ACF URL Field, click the wrench, in the key I choose the specific acf field where the url has been input on the backend.

    Instead of writing “” in the acf field, should I be inputting a different way?

  • Button Widget – What page builder are using?

  • Sorry, using Elementor.

  • I am assuming that you’re using Elementor Pro.

    I do not know why it would not be working. When you look at the source of the page (html) is there any value in the href? if there is, what is it?

  • I don’t see any href value at all. I see one in the section right above though, for an icon I have linked (total separate design element).

  • And this is a URL field type, not a link or post object or some other type of field?

    Is it a sub field of any kind like in a repeater or group field?

  • Well the FIELD GROUP is called “Subscribers” and has 4 fields; “first name, last name, email address and subscriber dropbox” The “dropbox” field type is URL and is added to USERS when a user’s role is SUBSCRIBER.

  • The field is saved to the user, not the post. Elementor can only get fields from the post that is being displayed. In this case you would need to get the user id of the user field and then get the correct field from the user.

    The only way to do this in elementor is to write custom code with something like a shortcode.

  • I just noticed something new, when setting this up, linking the button via acf url field, etc. and I click update, I can hover cursor over button and see the link pop up in the bottom left corner… but if I REFRESH browser and Elementor, and go hover over button the link is dead. Still shows linked to acf url field… but if I remove, then RELINK it rolls again, hovers and shows in left hand corner… until I refresh browser again.

    I have Elementor attempting to resolve this as well, and I definitely appreciate your time and help here as well!!!

  • Elementor’s pulling the other fields from USER for the button, just not the url field : /

  • Sorry, I don’t know much about how elementor works with ACF. That is in their plugin. And I’m not exactly sure what type of field is working. If you are talking about the user field that relates the post to user then this field is saved to post meta for the post and not user meta for the user. In the end this is something you need to resolve with elementor. As I said, more than likely you will need to build custom code in the form of a shortcode to allow showing the field.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.