Passer la navigation

[Résolu] Show content only for logged in users

This support ticket is created Il y a 3 years, 4 months. 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 -

Fuseau horaire du supporter : Asia/Karachi (GMT+05:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par siddhantB Il y a 3 years, 4 months.

Assisté par: Waqar.

Auteur
Publications
#2538923

Hello Support,

I am trying to hide book your lesson tab- lien caché for logged in users like this- lien caché

Link to a page where you can apply these settings : lien caché

Please check & do this for me.

Thanks
Sid

#2539713
conditional-block-user-login.png

Hi Sid,

Thank you for contacting us and I'd be happy to assist.

I've checked the content template and noticed that it is using a third-party block for showing that tabbed content. As it doesn't seem to offer any built-in option for showing/hiding the content, based on the visitor's logged-in/logged-out status, you can use two conditional blocks from Toolset, for showing two different sets of tabs:
https://toolset.com/course-lesson/using-toolset-conditional-block/

In the first conditional block, you'll set the condition that 'the current user's ID is not empty', which will mean that the visitor is logged in.
( example screenshot attached )

Inside this conditional block, you'll include a "Tabs" block, with the tabbed content that should only be visible to the logged-in users.

Similarly, you'll include another conditional block with the condition that 'the current user's ID is empty', meaning that the visitor is not logged in.

Inside this conditional block, you'll include another "Tabs" block, with the tabbed content that should only be visible to the logged-out users.

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2539863

My issue is resolved now. Thank you!