Remove Sidebar from Learndash pages

Hello,

I’m trying to remove the sidebar from all of my Learndash pages. Can you please assist with this?

Much appreciation!

Hi there,

Please try adding this code to the Global CSS:

.single-sfwd-courses .x-main {
    width: 100%;
    margin-right: 0;
}

.single-sfwd-courses .x-sidebar {
    display: none;
}

In case this does not work, please provide the url of your site.

Thank you.

Hi,

Please replace the css code with this.

.single-sfwd-courses .x-main {
    width: 100% !important;
    margin-right: 0;
}

.single-sfwd-courses .x-sidebar {
    display: none;
}

body..single-sfwd-courses {
   padding-left:0 !important;
}

Hope that helps

Thank you.

The contents of the sidebar are no longer visible, but the sidebar space is still there. Also, I’d like the sidebar removed from the other course pages. Can you help with this?

Thank you!

Hi there,

Please update this code:

body..single-sfwd-courses {
   padding-left:0 !important;
}

to

body.single-sfwd-courses {
   padding-left:0 !important;
}

Hope this helps.

Thank you again.

That change removed the sidebar; however, the main menu shifts to the right (when scrolling down the page.

Also, can you help me to remove the sidebar on the lesson pages?

Thank you!

Hi There,

Thanks for writing in again!

For the main menu issue, please use this CSS.

.x-masthead .x-bar-fixed {
width: 100% important;
}

Can you please give the page URL that you want to remove the sidebar. Seems I didn’t find the page.

Thanks

Hi,

Please change this

.x-masthead .x-bar-fixed {
width: 100% important;
}

to this


.single-sfwd-courses .my-bar.x-bar-fixed {
    width:100% !important;
}

Then to remove sidebar on other courses page, add the code below

.single-sfwd-lessons {
   padding-left: 0px !important;
}

.single-sfwd-lessons .x-sidebar {
    display:none;
}

Hope that helps

Thank you very much!

The code removed the sidebar from the other course pages, however, it moves to the right when I scroll down. Could you help again with this?

Thank you!

Hi k_nashi,

I can not recreate the “move to right” problem that you are talking about on the page below:

https://begenki.org/courses/self-development-course/

Please give us a more detailed description of the problem and a screenshot to be able to give you a proper answer. I suggest that you clear your browser cache or check the website with another machine so that you can make sure that you see the live version of the site and not the cached one.

Thank you.

Hello,

The issue was solved previous for the page you mentioned. The issue is now on the course (lesson) pages. For example: https://begenki.org/courses/self-development-course/lessons/chapter-1/.

Thank you for continuing to look into this.

Hello There,

You may need to update the code:

.single-sfwd-lessons,
.single-sfwd-topic {
   padding-left: 0px !important;
}

.single-sfwd-lessons .x-sidebar,
.single-sfwd-topic .x-sidebar {
    display:none;
}

We would loved to know if this has work for you. Thank you.

Hello,

Apologizes, but I’m still having the same issues with the main menu on the lessons pages. Appreciate your additional assistance.

Hi,

Please add this code as well.

.logged-in.admin-bar .courses-bar.x-bar {
     width:100% !important;
} 

Thanks

@paul.r

Thank you very much. The addition of that code fixed the issue.

Appreciate all of the assistance!

You’re welcome! :slight_smile:

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