Skip Navigation

[Resolved] Issue with code displaying on page

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

Problem: I have an accordion created in Layouts that includes a Types field shortcode inside a wpv-conditional shortcode. For some reason the closing types field shortcode is displayed on the front end of the site.

Solution: Check the order of the opening and closing shortcodes. In this case, the Types field shortcode should be closed before the wpv-conditional shortcode is closed.

<p>Telephone:   [types field='home-response-telephone'][/types]</p>
<p>[wpv-conditional if="( NOT(empty($(wpcf-home-response-opening-hours))) )"]Opening Hours:   [types field='home-response-opening-hours'][/types][/wpv-conditional]</p>
This support ticket is created 6 years, 6 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.

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

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by StephenD4019 6 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#904640
Capture.JPG

hidden link

When you click on home response claims on any company you see the code:
[/types]

I have checked the code and everything seems fine and I cannot work out why this is displaying.

#904647

Can you tell me more about this accordion?
- Is it created in Layouts, or in some other system?
- If it's in Layouts, can you share the code you have included in this panel?
- If it's some other system, can you copy + paste the code you have used to generate the accordion panels?
- Please temporarily deactivate all plugins except Views and Layouts, then activate a default theme like Twenty Seventeen. Is the problem still visible?

#904649

I deactivated all other plugins and used 2017 theme and still had the same issue.

It is created in layouts.

The code is:
<p>Telephone:   [types field='home-response-telephone'][/types]</p>
<p>[wpv-conditional if="( NOT(empty($(wpcf-home-response-opening-hours))) )"]Opening Hours:   [types field='home-response-opening-hours'][/wpv-conditional][/types]</p>

Thanks.

#904651

I see, it appears that the wpv-conditional closing shortcode is positioned inside the types field shortcode. Try this instead:

<p>Telephone:   [types field='home-response-telephone'][/types]</p>
<p>[wpv-conditional if="( NOT(empty($(wpcf-home-response-opening-hours))) )"]Opening Hours:   [types field='home-response-opening-hours'][/types][/wpv-conditional]</p>
#904654

Excellent service. Response received very quickly and issue sorted out within 30 minutes.
Thank you.