Skip Navigation

[Closed] Shortcode outputs closing tag in html

This support ticket is created 4 years, 10 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)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1742703

I am trying to get around this issue by using shortcodes,
https://toolset.com/forums/topic/block-editing-doesnt-show-field-group-to-bind-data-to/

I am using the following text to display a clickable tel: link

<div>
  <a href="tel:[types field='fs_phone' output='raw'][/types]">
    <i class="fa fa-phone-square blue" aria-hidden="true"> [types field='fs_phone'][/types]</i> 
  </a>
</div>

The resulting <a> tag looks like this:

<a href="tel:0411 747 363[/types]"><i class="fa fa-phone-square blue" aria-hidden="true"> 0411 747 363</i> </a>
#1742969
phone-field.JPG

Hello,

I assume we are talking about a custom "Phone" field created with Toolset Types plugin.
How do you display those codes you mentioned above?

I have tried it in my localhost with below a "Shortcode Block" + below codes:

<div>
<a href="tel:[types field='fs_phone' output='raw'][/types]"><i class="fa fa-phone-square blue" aria-hidden="true">[types field='fs_phone'][/types]</i></a>
</div>

It works fine in my localhost, see my screenshot phone-field.JPG

More help:
https://wordpress.org/support/article/shortcode-block/

The topic ‘[Closed] Shortcode outputs closing tag in html’ is closed to new replies.