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.
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 “https://dropbox.com” in the acf field, should I be inputting a different way?
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!!!
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.
You must be logged in to reply to this topic.
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!
© 2022 Advanced Custom Fields.