Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

ACF links not working

  • 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 ?

  • 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?

  • 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?

  • 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?

  • 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.

  • 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.

  • 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/jZuyurnWLLByV

    Why URL field doesn’t work? Do you need to dynamically pull the text content as well?

  • 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.

  • 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 of custom_link.url to return the URL and custom_link.title to return its title etc.

    Both plugins are in alpha 2 , entering alpha 3 today:

    https://generatepress.com/generateblocks-2-0-a-new-era/

Viewing 16 posts - 1 through 16 (of 18 total)
  • You must be logged in to reply to this topic.