Skip Navigation

[Resuelto] I can't wrap toolset shortcodes in html tags / div tags

This support ticket is created hace 4 años, 3 meses. 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 respuestas, has 2 mensajes.

Last updated by Beda hace 4 años, 3 meses.

Assisted by: Beda.

Autor
Mensajes
#1477453

I am trying to display a Types field thusly:

<h3>Title: [types field='sha-subtitle'][/types]</h3>

Link to a page where the issue can be seen:

hidden link

I expected to see:

"Title: Can What You Eat Cause You Problems?"

Instead, I got:

"Can What You Eat Cause You Problems?
Title"

P.S. I've tried turning off all (except ToolSet) plugins and a default theme. Didn't change anything.

#1477893

You must have more code there than just the ShortCode and H3.

This because of the ShortCode [types field='sha-subtitle'][/types] clearly creating a link, but with dynamic link label (which is not possible in ShortCodes or blocks for URL ShortCodes).

I assume you somehow populate HREF with the ShortCode?
Can you paste here the entire code you use, so I can suggest amendments?

If you are using an URL field of Types, this should work just fine

<h3>Title [types field='url'][/types]</h3>

BUT, you wouldn't get those dynamic link labels as you have, and hence, there should be some code I miss yet, can you share it?

#1478949

You helped me see my mistake.

I had this:

[wpv-post-link]
<h3>Title: [types field='sha-subtitle'][/types]</h3>

and I should have had this:

<h3>Title: [wpv-post-link]</h3>

For whatever reason, I was thinking this:
[types field='sha-subtitle'][/types]
was the shortcode that was outputting the title.
Whoops! My bad!

#1482355

Great, I am glad you could resolve the problem.

Please let us know if we can help with anything else.

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