How to hide tabs in single-course page

Home Forums Legacy Support Support queries Styling issues How to hide tabs in single-course page

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1690
    cornelmarcu
    Spectator
    I need to hide tabs like group and forum from the user who don't subscribe to the course. The tabs can pe show after the user became student for that course. Please advise.
    #1692
    cornelmarcu
    Spectator
    http://cursuri.mindevolution.ro admin 1234admin
    #2012
    Anshuman Sahu
    Keymaster
    #2054
    cornelmarcu
    Spectator
    Thanks for your advice. It is not working. You can verify for yourself. I send you already my credentials.   Thank you in advance.
    #2066
    cornelmarcu
    Spectator
    I use this code and working fine: add_action('wp_head','hide_group_forum'); function hide_group_forum(){ global $post; if(!is_user_logged_in() || (!wplms_user_course_active_check(get_current_user_id(),$post->ID) && !current_user_can('edit_posts')) ){ echo ' <style> #object-nav #forum { display: none; } #object-nav #group { display: none; } </style>'; } }
    #2140
    Anshuman Sahu
    Keymaster
    Please run the action on "wp_footer" as mentioned in the tip .
    #2141
    cornelmarcu
    Spectator
    But is not working ... maybe I use wplms one page course??? With the css above working fine.   Please advise.
    #2298
    Anshuman Sahu
    Keymaster
    To admin ,instructors and the students who are active in the course the forums and groups will show . The will hide the tabs for then non logged in users and the studnets who are not active in the course . I have checked this with wplms default theme on our test site and it is working fine .  
    #2309
    cornelmarcu
    Spectator
    Thank you for the response.   I put wp_footer and after that use this code. It is working for me:   <span style="color: #4b4d4d; font-family: Lato; font-size: 14px; line-height: 22px;">#object-nav #forum </span>   Keep the good work.
    #2446
    Anshuman Sahu
    Keymaster
    Marking as resolved and closing this topic
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘How to hide tabs in single-course page’ is closed to new replies.