I want to hide these field on frontend course creation only for Instructor Account, can I hide it by code? thanks
Refer: https://prnt.sc/1bi16o1
ah! yes possible but i need to check the code
please ping me tomorrrow
any update @Veronica ? thx
hi
as the previous provided custom for instructor only is not working on your site first we will work on that then move with other request
because then it will create mess
as soon as that will fix i will pick up your all topic links one by one and provide code accordingly
i hope you understand
Okay, thanks for pointing this before provide me a code. Some of your code not works before, but you're always successfully provide me the updated code and make it works. So you have my trust on this. Thanks for your effort @Veronica
@alex has provided the updated code on your another topic
please check and confirm if it is working there or not so we can proceed
on this topic: https://wplms.io/support/forums/topic/restrict-instructor-change-course-status-not-works/
Yes, it works! Please proceed to another request, thx before
hi
add this:
`add_filter('wplms_course_creation_tabs',function($tabs, $course_id=null, $user_id=null){
if($user_id && !user_can($user_id,'manage_options') || true){
$fields = $tabs['create_course']['fields'];
foreach ($fields as $key => $field) {
if($field['id'] == 'vibe_course_auto_eval'){
$field['is_child'] = false;
}
if($field['id'] == 'vibe_duration' || $field['id'] == 'vibe_max_students' || $field['id'] == 'vibe_start_date'){
//array_splice($curriculum_element['types'], 6,3);
if($field['id'] == 'vibe_duration'){
$field['children'] = [];
}
}else{
$new_arr[] = $field;
}
}
$tabs['create_course']['fields'] = $new_arr;
}
return $tabs;
},10,3);`
not works, refer: https://prnt.sc/1fk7wuk
let me check this on your site
hi
i have checked this
as I have mentioned in my previous replies on any of your topics
that when we copy the code then the ' ' text changed I have retyped it on your site
and now it is working on your site
please check and confirm
This reply has been marked as private.
Yes now it works, thanks @Veronica. U can close it
thanks for your confirmation