LearnDash includes some great shortcodes for showing content to learners that are enrolled in courses as well as users that aren’t enrolled—the [visitor] and [student] shortcodes. These are great on course pages, but what about inside Open courses and elsewhere on a LearnDash site? Sometimes you may want to show content based on the user’s signed-in state rather than whether or not they’re enrolled in a course. We use this a lot when we want to hide content from anonymous visitors (while still giving them a taste of what’s available) and encourage users to create an account to view free course materials.
See this module in action on our LearnDash demo site!
We include a [uo_show] shortcode in the Toolkit that make it easy to show content based on signed-in state. Here are some examples of how to use the shortcode:
[uo_show for='loggedin']Content for logged in users[/uo_show]
That example displays the text to users that are signed in. This might be useful in an Open course to display special bonus content, like a video or download.
[uo_show for='loggedout']Content for logged out users[/uo_show]
That example displays the content for users that aren’t signed in. This is helpful for calls to actions and other marketing that isn’t relevant to signed-in users.
in courses i enable hide course (edit courses) but content is still showing non logged users why?
content table is showing in given link why?
Hi there, it looks like you were able to get the content table hidden. Regarding the content showing; that’s something you could ask LearnDash, as the setting is built into LearnDash and not related to our plugins. Thanks!
I have the same issue…did you ever find out why this is?
I need at less 2 user catgories: Students 1 and students2.
May be I can get this done with: Cimy User Extra Fields.
Then both will take the same curse, but for students 2 I will need the are able to see more lessons.
In other words, I need hide some lessons to students 1
Can I use this little script or similar?
This should not be done, I’m afraid. You can’t make lessons optional in LearnDash, and if you did hide the lessons then users that didn’t see the lessons could never complete the course and progress wouldn’t be tracked properly. It won’t work; you should use a second course if some users see different lessons.
Is it possible to restrict a whole page depending on a user’s login status? I can already hide menu items based on a user’s logged in status, but is there a way to restrict logged out users from even getting to a page, even if they had the URL? The best solution would be to redirect them to a different page where I can prompt them to log in or get in touch.
It’s not possible with this module, but there are ways of achieving this with other plugins. Many membership plugins allow restrictions on entire pages.
I’m looking for the same behavior. Did you find a plugin to do this ?