[Cerrado] Conditional Content if User Not Logged In
This support ticket is created hace 3 años. 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
-
9:00 – 12:00
9:00 – 12:00
9:00 – 12:00
9:00 – 12:00
9:00 – 12:00
-
-
13:00 – 18:00
13:00 – 18:00
13:00 – 18:00
14:00 – 18:00
13:00 – 18:00
-
Supporter timezone: America/Jamaica (GMT-05:00)
Este tema contiene 3 respuestas, tiene 2 mensajes.
We actually do have a shortcode that can check the users logged in status. The shortcode you can use is [wpv-current-user info="logged_in"]
This shortcode will return true or false if the user is logged in or not. You can therefore use this in our conditional statement to check the status of the user.
Here is a simple example below.
[wpv-conditional if="('[wpv-current-user info='logged_in']' eq 'true' "]
Do something if logged in
[/wpv-conditional]
Thanks. That is helpful, although it's still not working. Attached are two screenshots. I tried enabling debug mode but even that output does not appear. Does it being inside a widget have an impact? When I add the shortcode you provided as text inside a paragraph block it correctly displays "false" but it doesn't seem to have the desired effect inside the conditional block.