New User Types & All Instructor like Page

Home Forums Legacy Support Support queries Other issues New User Types & All Instructor like Page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #260064
    edfinite
    Spectator
    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' =&gt; 'Employer Sidebar', 'id' =&gt; 'employer_sidebar', 'before_widget' =&gt; ' ', 'after_widget' => ' ', 'before_title' =&gt; ' <h4 class="dash_widget_title">', 'after_title' =&gt; '</h4> ', 'description' =&gt; __('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-&gt;roles ) &amp;&amp; is_array( $user-&gt;roles ) ) { if(in_array('employer',$user-&gt;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:
    1. All Employers
    2. All Mentors
    Thanks  
    #260066
    edfinite
    Spectator
    Also request you to check various codes in the WPLMS Customizer Plugin, I dont know what those are for...
    #260290
    MrVibe
    Keymaster
    The codes in the WPLMS Customizer are not being used. There are 2 files. only 1 of them is included. a.  Copy the page, wplms / allinstructors.php and change the role to employer and monetor b. The roles do not change on run time, you will first need to unregister / remove  the role and then add a new one in its place.
    #260867
    edfinite
    Spectator
    This reply has been marked as private.
    #261239
    Anshuman Sahu
    Keymaster
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘New User Types & All Instructor like Page’ is closed to new replies.