Skip Navigation

[Resolved] Showing link text as link – shortcode in shortcode

This support ticket is created 6 years, 7 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.

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

This topic contains 2 replies, has 2 voices.

Last updated by Lykke Scavenius 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#571929
view broken shortcode.JPG
link text shortcode in link shortcode.JPG
link post type.JPG

I have a link post type, to attach multiple links to concerts. Each "link" has a "link text" and a "URL", I've been trying to make the link text display as the link, but it's not working. How do I do this.

Se image for "link post type".

Here, Sugaray Rayford concert, hidden link in left column scroll down to middle you'll see 2 links,

They are created as:
[types field='link-tekst'][/types]:<br/>[types field='link-url' target='_blank'][/types]
Link text: URL

What I've tried is:
To make the "link text" be the link. See image "link text shortcode in link shortcode"
[types field='link-url' title='[types field='link-tekst'][/types]' target='_blank'][/types]

But the code is broken, see image "view broken shortcode"

Thanks for your time
Best regards
Lykke

#571967

Dear Lykke,

I suggest you setup the link with HTML codes manually , for example:

<a href="[types field='link-url' output='raw'][/types]" target="_blank">[types field='link-url' title='[types field='link-tekst']</a>

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#url
Attribute output:
'raw' | 'html' | 'normal'(default)
‘raw’=display raw data stored in DB, ‘html’=wrap data in HTML

#573009

Thanks 🙂
I will try this as soon as I get back from my holiday, in the meantime I imagine the thread will be closed, so I will create a new one if I need more help.

Best regards
Lykke

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.