Okay
  Public Ticket #2787317
Backend configuration
Closed

Comments

  •  6
    João started the conversation

    Hi,


    I want my employees to have access to the backend.  But I want to hide some of the tabs just leaving access to Calendar and Employees.


    How can I do this?


    Thanks in advance.


    João

  • [deleted] replied

    Hi João,

    thank you for reaching out to us!

    Unfortunately we don't have a way to limit the tabs, but you can install User Role Editor plugin to change what capabilities your Employee will have in the backend.

  •  6
    João replied

    Hi Ivana,

    Thanks for the reply.


    I have installed Add Admin CSS and I think I got this:


    /*Hide Appointments

    #toplevel_page_amelia > ul > li:nth-child(3){
    display: none;
    }

    /*Hide Events

    #toplevel_page_amelia > ul > li:nth-child(4){
    display: none;
    }

    /*Show Appointments for administrator

    .role-administrator #toplevel_page_amelia > ul > li:nth-child(3)  { 
    display: block!important; 
    }

    /*Show Events for administrator

    .role-administrator #toplevel_page_amelia > ul > li:nth-child(4)  { 
    display: block!important; 
    }


    Added this function to functions.php

    function wpa66834_role_admin_body_class( $classes ) {
        global $current_user;
        foreach( $current_user->roles as $role )
            $classes .= ' role-' . $role;
        return trim( $classes );
    }
    add_filter( 'admin_body_class', 'wpa66834_role_admin_body_class' );



  • [deleted] replied

    Hi João,

    thank you for the kind reply! I apologize for the later response, as we don't work on weekends.

    If this works for you, wonderful - have you had a chance to test it yet?