Hide a Course from student dashboard

Home Forums Legacy Support Support queries How-to & Troubleshooting Hide a Course from student dashboard

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #358371
    sfcit
    Participant
    I have a specific course on the dashboard of students who bought it. I want it to be hidden but not on the front end because they can purchase and we contact them for an in-person section. Later on we will decide whether to make it online or not. So for now I want it to be hidden on their dashboard. Any hook or code to make it happen.
    #358474
    Veronica
    Moderator
    hi well can you please share the exact screenshot that where you want to hide it
    #358502
    sfcit
    Participant
    https://snipboard.io/m03Y8N.jpg This course specifically need to be removed from the student dashboard.
    #358793
    Veronica
    Moderator
    hi the delay in response due to support holiday well we need to check this please provide all details with the student credentials too and also confirm if you want to hide it from all users or with this specific one?
    #358997
    sfcit
    Participant
    I want specific course called 'Dental Implant' to be hidden from student role only i.e. from all students not from the instructors.
    #359095
    Ada
    Participant
    HI, You need to add following code in wplms customizer.php First Install and activate wplms customizer plugin on your site Then goto plugin editor >>wplms customizer.php and at the end add the code
    
    function hide_particular_course(){
      if(is_user_logged_in() && !current_user_can('edit_posts')){
        ?>
        <style>
          #vibebp_member #course_component .mycourses .course_block_wrap.course_block_wrap_1186 {
        display:none !important;
    }
    </style>
    <?php
      }
    }
      add_action('wp_head', 'hide_particular_course',99);
    
    #359150
    sfcit
    Participant
    Please add the hook where I should attach this function
    #359248
    Ada
    Participant
    Oh , sorry it was missed while pasting the code. I have edited my previous reply and added the hook . Now you can add the code.
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Hide a Course from student dashboard’ is closed to new replies.