-
apinajus
Hello,
I have designed a template for my blog posts.
I am using a variety of ACF fields and all of them are working except the LINKS ones.
Can you have a look please?
I am pulling the link from the post meta and using correctly the name of the field set up in ACF.See some screenshots here, here and here.
You can check one test post with the result here.
Thanks.
-
Hi there,
try:
1. add a GB Button block to the page.
2. Set its styles to remove the button style
3. set its Link URL to#
4. Activate the Dynamic Data and set the Link Source to your custom field.Does that work ?
-
apinajus
Hey David,
I am afraid is not working…
See the screenshot with the parameters that I’ve set.
I just added the button, but neither the button nor de standard link is working.See image.
Any thoughts?
-
apinajus
Ah, I noticed that I am us Ing an alpha version of GP.
Can this affect? -
I don’t think so. But make sure you update both GB and GB Pro to 2.0.
Your link to the test post is returning 404, can you check?
what’s the ACF type of the
link_to_gmaps
? What is the retuning value set in ACF? -
apinajus
Hi Ying,
I am currently using v3.5.1 via child theme.
This is the link to the post: https://atlasviaje.ro/ainsa/
The field is set to be a link (see image) and it should be returning url and title (see ACF doc here).I’ve added an access to the admin in the site in case you want to have a look.
-
Based on your screenshot, the return value is set to
Link array
which GB does not support.Can you set the field’s return value to
Link URL
instead? -
apinajus
With link URL does not work either…
Also I have seen some posts in the fórum where people is asking the same question.
I need it to be a link array.Can you provide me with some work around please?
-
I need it to be a link array.
GB does not work with array values.
I checked the values, I think using URL field is a better choice than Link field. Give it a try.
-
apinajus
Hi Ying,
I understand that this issue might look like non important, but it is.As I told you an URL field does not make sense here. So I’ve tried two things:
1) Use a button (as per David’s above). I guess I was doing something not propperly. It works. Problem is that I cannot mimic it like a standard link in the web (underline it, etc.)
2) I’ve tried to change the field to a WYSWYG block and it works as a link array, but with issues.
See the screenshot here.
Why I am getting this behavior?
Also, could you provide a snippet to solve this? I am pretty sure that I am not the only one experiencing it. Thanks. -
apinajus
Oh, you can check the web here -> https://atlasviaje.ro/post-dummy-2-lugares/
-
1) Use a button (as per David’s above). I guess I was doing something not propperly. It works. Problem is that I cannot mimic it like a standard link in the web (underline it, etc.)
I don’t see a link attached to the button, have you tried clicked it?
2) I’ve tried to change the field to a WYSWYG block and it works as a link array, but with issues.
It won’t work, the headline’s structure breaks, this is the HTML output of that headline:
https://app.screencast.com/jZuyurnWLLByVWhy URL field doesn’t work? Do you need to dynamically pull the text content as well?
-
apinajus
Ok, re WYSWYG block.
Now you can see that is working: https://atlasviaje.ro/post-dummy-2-lugares/
And yes, ideally I should pull the text from the field meta in some cases. But I can leave without this for now.Why is not working the ACF link array in GP straight away? I guess it is a pretty common usage of the field, isn’t it?
-
Now you can see that is working: https://atlasviaje.ro/post-dummy-2-lugares/
I don’t see any of the buttons/headlines have a link.
None of them can be clicked, am I missing anything?Why is not working the ACF link array in GP straight away?
As I said multiple times, GB does not support array values. It’s complicated to program, but we are working on it.
I would still suggest use URL field instead of link field.
-
apinajus
You can have a look here: https://atlasviaje.ro/ainsa/
I am using URL field and your button block. So the only part that I am missing is the button dynamic text content.
I know that you GB does not support array values, as you have repeated – recklessly – so many times. There is a support post from David from 2 years ago saying that you are working on it. I understand that this is a so hard issue that is taking so long time.
Thanks.
-
You can do it in GenerateBlocks 2.0 and GenerateBlocks Pro 2.0
As thats supports tighter ACF integration and arrays.For example if a have a Link field named:
custom_link
I can use the Post Meta dynamic tag ofcustom_link.url
to return the URL andcustom_link.title
to return its title etc.Both plugins are in alpha 2 , entering alpha 3 today:
- You must be logged in to reply to this topic.