Skip Navigation

[Resolved] custom link to wrap around the entire view

This thread is resolved. Here is a description of the problem and solution.

Problem:

Display URL field with custom HTML codes.

Solution:

You need to output the URL link directly with attribute output='raw', for example:

https://toolset.com/forums/topic/custom-link-to-wrap-around-the-entire-view/#post-1202807

Relevant Documentation:

https://toolset.com/documentation/customizing-sites-using-php/functions/#url

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

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/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by digitalF 5 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1202497

Hi,

I have a custom link field which I would like to contain the entire body view view. Currently I have the following code:


[wpv-post-body view_template="None"]

This isn't giving me the intended result. Instead of the link containing the view and acting as a link, I'm seeing the link displayed on page as plain text.

How can I get this working?

Many thanks.

#1202807

Hello,

I assume the field "deal-link" is a custom URL field created with Toolset Types plugin.

If it is, you need to output the URL link directly with attribute output='raw', for example:

<a href="[types field='deal-link' target='_blank' output='raw'][/types]">[wpv-post-body view_template="None"]</a>

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#url
With output=”raw” just the text of the link will be output.

#1203176

My issue is resolved now. Thank you!