Site logo

Archived topic

Dynamic Link is not working as expected

6 replies · Started by Christie on May 27, 2022

Viewing posts 1–7 of 7

Hi,
The Dynamic Link is not working in 2 different circumstances when URL is retrieved from a term_meta field:

a) When I use The Dynamic Data feature in a HEADLINE block, the term_meta field appears in Dynamic Link options, but when I check the front-end result, the generated link has the previous term_meta field value (Content. ex. href="text20%of20%previous20%field">).
https://imageup.me/2tv
HTML result(see link): https://imageup.me/2tx

b) When I use The Dynamic Data feature in a CONTAINER block as in this link (https://docs.generatepress.com/article/dynamic-data/#dynamic-background), the term_meta field doesn't appear in Dynamic Link options.
https://imageup.me/2ty

What is your suggestion to make it work in both circumstances?

Thanks

Hi there,

can i see the site where the term meta link is incorrect ?

Please see links below: (private field)

Hi Scott,

What the term mata value should be? And what's the term? If it's a custom term, how did you set up the term?

Let me know!

Hi, Jing.
The term is Category. And all the term_meta are set via ACF. The first term_meta is working as expected "bubble_message", but the other, "bubble_url" is not. In the following images, you can see the settings and the HTML result (pay attention to the link in the code). It shows the text from the "bubble_message" term_meta and should show the URL from the "bubble_url" term_meta.
https://imageup.me/2tv
https://imageup.me/2tx

I can replicate the issue on my end.

I will forward this to Tom.

Hi there,

Thanks for reporting this - we've fixed it in GPP 2.2.0.

For now, you can make the following change if you'd like:

1. Open wp-content/plugins/gp-premium/elements/class-block-elements.php
2. On line 598, replace gpDynamicTextCustomField with gpDynamicLinkCustomField.

Hope this helps! :)

This archived topic is closed to new replies.