Title: Custom CSS per User Role issues
Last modified: October 8, 2018

---

# Custom CSS per User Role issues

 *  Resolved [roostergr](https://wordpress.org/support/users/roostergr/)
 * (@roostergr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-per-user-role-issues/)
 * I wanted to load custom CSS per user role (ie. for Editor), so I did the followings:
   
   A. **In the _Custom PHP_ field of the WP Custom Admin Interface I have added:**_
   function wpse\_load\_editor\_stylesheet() { if ( current\_user\_can( ‘editor’)){
   wp\_enqueue\_style( ‘login-editor-style’, home\_url( ‘/login/editor-style.css’));}}
   add\_action( ‘wp\_enqueue\_scripts’, ‘wpse\_load\_editor\_stylesheet’ );
 * B. **In the _editor-style.css_ field I have added:**<br/>
    _#dt\_page\_box-post\
   _options, #dt\_page\_box-header\_options { display:none !important; }
 * With this way I succeded to suppress the **dt_page_box-post_options** but not
   the **dt_page_box-header_options** div….
 * But if I write into the _Custom CSS_ field of the WP Custom Admin Interface the
   same css (*) I have the results I want. What’s the problem with the Header options
   metabox? Why this is still exists? Any ideas?
 * (*)
    _#dt\_page\_box-header\_options, #dt\_page\_box-slideshow\_options {display:
   none}_
    -  This topic was modified 7 years, 7 months ago by [roostergr](https://wordpress.org/support/users/roostergr/).
    -  This topic was modified 7 years, 7 months ago by [roostergr](https://wordpress.org/support/users/roostergr/).
    -  This topic was modified 7 years, 7 months ago by [roostergr](https://wordpress.org/support/users/roostergr/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [roostergr](https://wordpress.org/support/users/roostergr/)
 * (@roostergr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-per-user-role-issues/#post-10758397)
 * I forgot to mention that I want these modifications **only for Editors**.
    With
   the usage of _Custom CSS field_ of the WP Custom Admin Interface, I have the 
   results for every user, even the Admin…
 *  Plugin Author [Northern Beaches Websites](https://wordpress.org/support/users/northernbeacheswebsites/)
 * (@northernbeacheswebsites)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-per-user-role-issues/#post-10758448)
 * Hi [@roostergr](https://wordpress.org/support/users/roostergr/),
 * The CSS customisation we provide does not allow targeting of the CSS based on
   role. What I suggest is you just create your own plugin or add to your functions.
   php file to do such a customisation because it seems you are advanced enough 
   to do so! 🙂
 *  Thread Starter [roostergr](https://wordpress.org/support/users/roostergr/)
 * (@roostergr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-per-user-role-issues/#post-10758482)
 * Thanks for your quick answer. Do you think to include this capability (code per
   role) in a future update?
    This would make your plugin not only perfect, but …**
   divine**!
 * Keep your nice work!!!!!!
 *  Plugin Author [Northern Beaches Websites](https://wordpress.org/support/users/northernbeacheswebsites/)
 * (@northernbeacheswebsites)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-per-user-role-issues/#post-10758485)
 * Hi [@roostergr](https://wordpress.org/support/users/roostergr/),
 * It’s something I will consider; I am just heaps short on time and because this
   is a free plugin it takes a backseat to all my paid work which pays the bills.
   Thanks,
 *  Thread Starter [roostergr](https://wordpress.org/support/users/roostergr/)
 * (@roostergr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-per-user-role-issues/#post-10758560)
 * Anyway… Hope you the best and really THANKS !

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom CSS per User Role issues’ is closed to new replies.

 * ![](https://ps.w.org/wp-custom-admin-interface/assets/icon.svg?rev=1656274)
 * [WP Custom Admin Interface](https://wordpress.org/plugins/wp-custom-admin-interface/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-custom-admin-interface/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-custom-admin-interface/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-custom-admin-interface/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-custom-admin-interface/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-custom-admin-interface/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [roostergr](https://wordpress.org/support/users/roostergr/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/custom-css-per-user-role-issues/#post-10758560)
 * Status: resolved