Hide / disable courses according to wordpress user role

Home Forums Legacy Support Support queries How-to & Troubleshooting Hide / disable courses according to wordpress user role

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #356819
    CallFlex
    Spectator
    Hi, is it possible to hide courses from a certain type of user?
    #356924
    Veronica
    Moderator
    hi Please Go to wp_admin -> WPLMS -> course manager refer: http://prntscr.com/h1cgzs It will hide your courses from the directory for all users whether it is an administrator or other user. But the course could be accessible via direct link. As an administrator, you can enroll yourself in that course that is hidden from the directory so those courses will be visible to you in your profile. refer: http://prntscr.com/h1ckdl
    #357259
    CallFlex
    Spectator
    Thanks for the prompt help! What I really needed is to delegate so that certain courses would appear only for certain types of users. For example: Course 1,2,3 and 4 are for user A. Courses 1,2,3,4,5 and 6 are for user B. Got it??
    #357418
    Veronica
    Moderator
    hi but this is not available in v4 of the theme
    #357431
    CallFlex
    Spectator
    Yes, I know. I was wondering if there is a possibility to do this via code and how I could do it. I would like to understand if we can hide certain courses for certain users in the list of the courses page. For example, Student A cannot view courses that have a certain category.
    #357457
    CallFlex
    Spectator
    I managed to think of a way. I will add a body class with the user type in wordpress. Then, I will also add the course category within the course listing item. Then I will put a display: none in the item when in the html there is a body with a specific type of user and in the list of courses there is also a specific category. It works? There is the possibility to add a course category within the div (in this case, the div containing 'vibebp_course').
    #357554
    Anshuman Sahu
    Keymaster
    Well in course directory we can hide it .We have a filter in which you can specifically hide the course by checking its category . apply_filters('wplms_course_thumb_extras','',$custom_post);
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Hide / disable courses according to wordpress user role’ is closed to new replies.