Hide Tabs on Instructor Dashboard

Home Forums Legacy Support Support queries How-to & Troubleshooting Hide Tabs on Instructor Dashboard

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #158768
    jqschied
    Spectator
    Hello, I want to hide the My Courses, Results and Stats tabs and only leave the Instructing Courses tabs for Instructors (Only for instructor as Students need these). Instructors don't need them and I want them to hide. Is there a codes that do this tasks? Thanks in advance.
    #158795
    Diana
    Participant
    @jqschied, Please paste this code in wp-admin > Plugins > Editor > Select WPLMS Customizer Plugin > wplms-customizer.php This will remove the tabs for instructors only. But it will not remove my-courses tab because the function I ma using here need the slug of the tab which you want to remove. The slug of courses and my courses tabs are same. So I can hide my courses tab instead of removing the tab. //Remove results,stats,my courses tab for instructors only add_action('bp_setup_nav','bp_remove_menu_tabs_from_user_profile',999); function bp_remove_menu_tabs_from_user_profile() { if(current_user_can('instructor')){ bp_core_remove_subnav_item('course','course-stats'); bp_core_remove_subnav_item('course','course-results'); ?> <style> .bp-user #buddypress .item-list-tabs#subnav ul li #course{display:none;} </style> <?php } }
    #158924
    jqschied
    Spectator
    Thanks! It worked. But can the tab "Course" default to "Instructing Courses" instead of the hidden "My Courses"? Currently, it says "No Courses found". Instructor needs to click on "Instructing Courses" before they see the content. Is there a code to adjust to make the default be "Instructing Courses", so no more extra click?
    #159012
    Diana
    Participant
    @jqschied Yes, this is possible using javascript code. Please wait for my next reply.
    #163918
    jqschied
    Spectator
    Hi @Diana, Any update on this? Thanks
    #164224
    Diana
    Participant
    @jqschied, Forgot to check this. Thanks for reminding me. Let me check
    #164452
    jqschied
    Spectator
    @diana, K, just let me know when the code is ready and I'll try it out. Thanks!
    #164616
    Diana
    Participant
    @jqschied, Okay, Sure
    #165105
    jqschied
    Spectator
    @diana, how's this request? updates?
    #165222
    Diana
    Participant
    @jqschied, I think this will do the trick. Please paste the code with script tag in wp-admin > WPLMS > Footer $(document).ready(function() { $('#course-personal-li').removeClass('current'); $('#instructor-courses-personal-li').addClass('current'); });
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Hide Tabs on Instructor Dashboard’ is closed to new replies.