Sometimes, you might want to remove certain courses from appearing on a user’s profile page in LearnDash. Perhaps a course is outdated, or it’s an open course that doesn’t require enrollment and just clutters the view. Whatever your reason, you can hide specific courses quickly using custom CSS. In this guide, I’ll walk you through the process step by step—no advanced coding skills required!
Step 1: Find the Course ID
To hide a course, you first need its unique ID in LearnDash. Here’s how to find it:
- Log in to your WordPress dashboard.
- Go to LearnDash LMS > Courses.
- Hover over the course you want to hide. At the bottom left of your browser, you’ll see a URL with something like
post=12345
. That number (e.g.,12345
) is the course ID. - Alternatively, edit the course, and check the URL in your browser’s address bar—it’ll include the ID after
post=
.
Step 2: Add Custom CSS
Now, let’s hide the course using CSS. You can add this code in one of two ways:
- Through Your Theme: Go to Appearance > Customize in WordPress, then find the “Additional CSS” section.
- Using a Plugin: If your theme doesn’t offer a CSS option, install a plugin like “Simple Custom CSS” and use its editor.
Paste this code into the CSS editor:
/* Hide specific course from LearnDash Profile */
div#ld-course-list-item-46904 {
display: none;
}
Replace 46904
with the ID of the course you want to hide. For example, if your course ID is 12345
, the code becomes:
div#ld-course-list-item-12345 {
display: none;
}
To hide multiple courses, add a block for each ID:
div#ld-course-list-item-12345 {
display: none;
}
div#ld-course-list-item-67890 {
display: none;
}
Note: This CSS hides the course from the profile page for all users. It’s a visual change only—it doesn’t remove the user’s enrollment or access to the course itself.
Step 3: Verify the Change
Save your CSS and visit a user’s profile page in LearnDash. The course should no longer appear. If it’s still visible, double-check:
- The course ID matches exactly.
- The CSS was saved correctly in your theme or plugin.
Conclusion
Hiding courses from the LearnDash profile page is a fast, simple way to keep things tidy and improve the user experience. Whether you’re decluttering old courses or streamlining the display, this CSS trick does the job.