Skip Navigation

[Resolved] Cannot get URL field to work as a link

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 2 months ago.

Assisted by: Waqar.

Author
Posts
#2684313

Tell us what you are trying to do?

I am trying to use an HTML anchor with a link field to show the URL from the link field on the display.

Is there any documentation that you are following?

https://toolset.com/forums/topic/put-a-type-fields-url-into-a-link/

Is there a similar example that we can see?

?

What is the link to your site?

hidden link

On this page (and all the organizations displays), I'm using this shortcode:

<a href="[types field='website' output='raw'][/types]" target="new">[types field='website' output='raw'][/types]</a>

to show the url.

In this case, the website field is populated with:
hidden link

That is what appears as the text, but the href anchor just refers back to the current page.

What the heck am I doing wrong? 🙂

#2684340

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

I tested the same code and the link on my website and it generated the link, correctly.

On your website, the 'href' part of the link is empty, which is strange, because the same shortcode ([types field='website' output='raw'][/types]) returns the URL, for the link's text part.

It would be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty-One. If it's fixed, you can start adding the disabled items, one by one, to narrow down to a possible conflicting one.

If the issue persists, you're welcome to share temporary admin login details, in reply to this message.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2684543

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing these details.

Your observation is correct and it does seem to be related to the filtering applied by the Divi builder.

Here is a workaround that I tested and it worked. I created a new Toolset content template named 'Test CT' and included the code for the website field's link in that template.

Next, I included this newly created template in the Divi template for this post type, through the 'wpv-post-body' shortcode:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body )


[wpv-post-body view_template="test-ct" suppress_filters="true"]

#2684828

Thank you! I hope this gets resolved in a future version of Divi/Toolset.

barbaraB-2 confirmed that the issue was resolved on 2024-02-22 18:42:46.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.