Skip Navigation

[Resuelto] Conditional output not displaying complex content

This support ticket is created hace 6 años, 11 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Nigel hace 6 años, 11 meses.

Asistido por: Nigel.

Autor
Mensajes
#599088

Hello,

I'm building a page in layouts that needs to display a specific content based on the post status (draft, pending review, published). I have this functionality working for simple content (like a single header) but once I add more complex content (headers, links, ul, buttons) the page will fail to load. I've tried to narrow it down to find which elements are causing the issue and it seems that the issue occurs once there is a

    in the content. Any ideas what could be causing this?

    I keep all plugins updated so I don't think its that, fwiw.

    Thanks,
    Tom

#599191

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi Tom

Conditional shortcodes can be nested, and so regular expressions are used to identify and extract nested conditions, but the more complex your conditional content the more likely it is your site may choke on these regexes.

You say the page does not load. Can you check your logs for errors?

If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

That will create a debug.log file in your wp-content directory which you can examine in any text editor. Try visiting the same page that includes these conditional shortcodes and then inspect the log.

In your question the key "once there is a ... in the content" is blank, it must have been stripped. Try rewriting that inside code tags so I can see what you were referring to.

Let me know about that and the logs.

I may need to get access to your site to see your set up and possibly take a duplicate for testing, but I'll wait to hear back from you.