0
votes

First of all, I am new to wordpress and creating one application in wordpress. I am using one plugin, now in that plugin for particular role like student, teacher site goes into the admin panel.

Now, I want to customize admin panel look & feel for selected users like student & teacher. I have already tried "AG Custom Admin", but didn't satisfied completely. So, I want to make custom css.

Is there any way that I can is like,

if(is_admin())
{
    // Use Default CSS
}
else
{
    // My Custom CSS
}

If yes, then where can I use this condition? I am using wordpress 3.8

Any help will be very appericiable,

Thanks.

1

1 Answers

0
votes

Checkout current_user_can() method:
http://codex.wordpress.org/Roles_and_Capabilities#Capabilities

That method could be used like this:

if ( current_user_can('moderate_comments') ) {
    wp_enqueue_style( 'Teacher Styles', 'teacherStyles.css' );
}
else{
    wp_enqueue_style( 'Default Styles', 'defaultStyles.css' );
}