Skip Navigation

[Resolved] Conditional output does not work proper in layouts

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

Problem: Visual Editor adds paragraph tags in between conditional shortcodes, breaking conditional functionality.

Solution: Disable automatic paragraph tags

Relevant Documentation: N/A

This support ticket is created 7 years, 8 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
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 1 reply, has 2 voices.

Last updated by Dido 7 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#480208
what-happens.jpg

I am trying to: make a conditional output in Layouts.

I visited this URL: hidden link

I expected to see: Overlay disapears when this is empty

Instead, I got: the empty overlay or it disapears at all.

the problem is that layouts changes the code after saving.
see my screenshots.

#480443
disable-automatic-p.png

Hello Dido, I see that you are having some trouble using a conditional shortcode in your layout. I'll be happy to help with that today. First, can you verify the setting for "Disable automatic paragraphs" underneath the Visual Editor? I am attaching a screenshot here.

Please check this box, then manually remove the <p> </p> tags that were added around your opening and closing conditional shortcodes. Resave your layout, refresh the page, and check the results. Please let me know the results of this test.

If your conditionals are still not functioning correctly, I may need to log in to your WordPress admin area to see them in place. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still a good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

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