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

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.

Our next available supporter will start replying to tickets in about 6.85 hours from now. Thank you for your understanding.

This topic contains 3 replies, has 2 voices.

Last updated by Beda 3 weeks, 4 days ago.

Assigned support staff: Beda.

Author
Posts
#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

Beda
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

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

Beda
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Great, I am glad you could resolve the problem.

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