I need to hide group and forums tabs for non logged. I tried to use the code stated in
https://wplms.io/support/knowledge-base/hide-course-group-and-forum-for-non-active-user/ but it doens't work in Moder theme.
How to solve it?
Apologies for confusion.
The link would be hidden from users who are not subscribed to course.
And how can I hide group and forums for non logged user?
change this in above tip :
if(!is_user_logged_in() || (!wplms_user_course_active_check(get_current_user_id(),$post->ID) && !current_user_can('edit_posts')) ){
to
if(!is_user_logged_in()){
Doesn't work. I receive an error from the server when changing the code.
Code is workign fine at our end .
Can you please share admin credentials and site url to check the issue at your end ?
PS :mark reply as private while sharing the info .
Hi Alex,
I create an admin credentials which are:
username: testadmin
password: x07PM*1&RgK8J@$TRwoFtlc(
The site is: linkedin.nelsonemilio.com/wp-admin/
Fixed the issue please check and confirm .
It's working. Thank you.
Can you tell me what changes you did to make it work?
Thanks
We just changed the custom code in your wplms-customizer.php file in wplms customizer plugin .
Now the code is :
add_action('wp_footer','hide_group_forum11');
function hide_group_forum11(){
if(!is_user_logged_in()){
echo '
<style>
li#forum {
display: none;
}
li#group {
display: none;
}
</style>';
}
}
Thank you for the clarification