Show different sidebars based on User Login status

This tip will help you in setting up different sidebars based on a user’s login status.
Follow below steps to achieve this :

a. Go to WPLMS Options panel -> Sidebar manager and create some new sidebars . Note we’ll use this sidebar for logged in user in “Course directory” page.
For our demo we created a sidebar called : “example”

b. Now, go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_class.php

c. Add the following code in _construct function :

PHP Code:

d. Add the following code in class:

PHP Code:

e. Save file.

Now we have two sidebars for the All Course Page or course directory, one shows for non-logged in users and other shows for logged in users.

Was this article helpful?

Related Articles