
Control What Users Can See
hide HTML elements, Menus, and Other Details for specific criterion
Show/hide HTML elements to users having a certain role.
For example, administrator or subscriber or student
Show/Hide HTML elements, menus, and other details based on user’s enrollment in a LearnDash course.
Show/Hide HTML elements, menus, and other details based on user’s status like logged in or logged out.
Show/Hide HTML elements, menus, and other details by checking LearnDash group’s membership.
You simply need to add a CSS class to your element div or span.
As explained here, if Course or Group ID is 123
Add this CSS class: visible_to_logged_in OR hidden_to_logged_out
Add this CSS class: visible_to_logged_out OR hidden_to_logged_in
Add this CSS class: visible_to_course_all
Add this CSS class: hidden_to_course_all
Add this CSS class: visible_to_course_none
Add this CSS class: hidden_to_course_none
Add this CSS class: visible_to_course_123
Add this CSS class: hidden_to_course_123
For users with access to at least one course, add this CSS class: hidden_to_course_none
Add this CSS class: visible_to_course_complete_123
Add this CSS class: hidden_to_course_complete_123
Add this CSS class: visible_to_course_incomplete_123
Add this CSS class: hidden_to_course_incomplete_123
Add this CSS class: visible_to_group_all
Add this CSS class: hidden_to_group_all
Add this CSS class: visible_to_group_none
Add this CSS class: hidden_to_group_none
Add this CSS class: visible_to_group_123
Add this CSS class: hidden_to_group_123
For users with access to at least one group, add this CSS class: hidden_to_group_none
Add this CSS class: visible_to_role_administrator
Add this CSS class: hidden_to_role_administrator
Note:
– To show an element to multiple specific roles only, you need to add the element multiple times, one for each role.
– To hide an element/menu from specific multiple roles only you can add the element once add multiple classes to the same element.