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.
http://cursuri.mindevolution.ro
admin
1234admin
Thanks for your advice. It is not working.
You can verify for yourself. I send you already my credentials.
Thank you in advance.
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>';
}
}
Please run the action on "wp_footer" as mentioned in the tip .
But is not working ... maybe I use wplms one page course???
With the css above working fine.
Please advise.
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 .
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.
Marking as resolved and closing this topic