Show Learndash sidebars

Hi there,

I’m using Learndash LMS as it was highly recommended by many people for X theme. However I’m having trouble showing the Learndash sidebar. Currently my default sider bar is showing on course pages, but I would like the Learndash side bar to appear (which has the course progress bar and course navigation).

I tried creating a new side bar called Learndash and added it to all course pages with the WP category “Course” but that didn’t work either.

Any help is appreciated!
Thanks!

hello @vcmna,

Thanks for writing in!

To display the sidebar you have created, you must assign it to display in the taxonomy or category and it will be displayed only in the taxonomy or category page. It will not display in all the single post page under the taxonomy or category. If you want to display sidebars in your learndash pages, please check out this threads:
https://theme.co/apex/forum/t/learndash-sidebars-not-showing-on-topics/41751/6, https://theme.co/apex/forum/t/learndash-page-sidebar/37923, https://theme.co/apex/forum/t/learndash-and-pro/20784

Hope this helps.

Hi there - thanks for the reply. I’m still having issues unfortunately.
I created a sidebar “Blog” which is showing up on all the assigned pages, posts, and categories (see here for example where the “Blog” sidebar shows up https://vibrantcelestialmeditation.org/inner-genius/).

However the other sidebar I created “Learndash” is not showing up on the course pages with the assigned category (see https://vibrantcelestialmeditation.org/courses/introduction-to-vcm/) - there’s no sidebar showing up on this page.

I tried adding the 2 widgets I want (course progress and course navigation) to the main sidebar and they do show up on the preferred course pages. But this won’t work because then this sidebar will show up on all pages (not just course pages).

Can you tell me what I’m doing wrong?

Also, the threads you recommended require PHP coding and child themes. Unfortunately I’m a novice so these workarounds won’t work for me. If you have a solution with CSS I could try that.
Please help!

Hello @vcmna,

I have logged in and made the change as stated in the reference thread instead.

  • I uploaded a child theme and activated.

  • I added the custom code that will force to display your learndash sidebar;

function assign_my_sidebar($sidebar){ 
       if ( 'product' || 'sfwd-courses' || 'sfwd-lessons' || 'sfwd-quiz' || 'sfwd-topic' || 'sfwd-certificates' == get_post_type() )  {      
           return 'ups-sidebar-learndash';        
       }    
  return $sidebar;
}
add_filter( 'ups_sidebar', 'assign_my_sidebar');

Please check your site now.

This is perfect. Thank you so much for your help!

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.