Hi Vibe Themes,
I had previously created two user roles Employer & Streamer, by adding the following code in WPLMS Customizer Plugin :
add_action('init','employer_sidebar');
function employer_sidebar(){
$papa_capability=array( 'read');
add_role( 'employer', __('employer','vibe'), $employer_capability );
register_sidebar( array(
'name' => 'Employer Sidebar',
'id' => 'employer_sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
<h4 class="dash_widget_title">',
'after_title' => '</h4>
',
'description' => __('This is the dashboard sidebar for Employer','wplms-dashboard')
) );
}
add_filter('wplms_student_sidebar','wplms_employer_dashboard');
function wplms_employer_dashboard($sidebar){
if(is_user_logged_in()){
$user = wp_get_current_user();
if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
if(in_array('employer',$user->roles)){
return 'employer_sidebar';
}
}
}
return $sidebar;
}
It let users register on the website as Student, Instructor, Employer & Streamer,
Now I want to change one of the role i.e. Streamer to
Mentor, and I am unable to do so by editing the name in the code like
STREAMER = Mentor, please change it.
Secondly, I need two pages like All Instructor Page which will be:
- All Employers
- All Mentors
Thanks