1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Hide the LifterLMS Lessons List Sidebar

How to Hide the LifterLMS Lessons List Sidebar

Introduction

In LifterLMS, the Lessons List sidebar is visible to all users by default. If you want to hide this sidebar for all users except administrators, you can achieve this by adding a small custom function to your active theme. This guide explains how to hide the LifterLMS Lessons List sidebar for all users to create a cleaner course layout.

Custom Workaround

  1. Go to Appearance > Theme Editor in your WordPress admin dashboard.
  2. Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
  3. From the Theme Files list, click Theme Functions (functions.php).
  4. Paste the following code just before the closing PHP tag (?>):

  1. Click Update File to save the changes.

Note: Modifications are typically considered custom work, but we are making an exception in this case. Please review the BuddyBoss Support Policy.

Troubleshooting and FAQs

Q: The sidebar is still visible to non-admin users.
A: Make sure jQuery is loaded on the page. Also, double-check that the code is added to the active theme’s functions.php file.

Q: Can I hide the sidebar for specific user roles instead of all non-admins?
A: Yes. Replace current_user_can( ‘administrator’ ) with another capability check, e.g., current_user_can( ‘editor’ ).

Q: Will this affect mobile or responsive views?
A: The script hides the sidebar using jQuery, which applies to all views including mobile.

Q: Can this be undone?
A: Yes. Remove the code from functions.php and save the file.

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

  • This field is hidden when viewing the form
  • This field is for validation purposes and should be left unchanged.

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.