Improved Simpler CSS
[resolved] Subscriber role can see "Custom CSS" in admin toolbar (2 posts)

  1. jeffvand
    Posted 3 years ago #

    I love the custom css plugin! Thanks for putting this together. I have one issue. The subscriber role can see "Custom CSS" in the admin toolbar when logged in. They can not access it, but it shows up in their toolbar which is confusing for some of our subscribers. Any way we can remove that?

    Thanks so much!


  2. jeffvand
    Posted 3 years ago #

    I finally took some time today to figure this one out. I added the following to my theme functions.php file to remove the "Custom CSS" for everyone but the administrators.

    if (!current_user_can('manage_options')) {
    function remove_customcss_bar_links() {
    global $wp_admin_bar;
    add_action( 'wp_before_admin_bar_render', 'remove_customcss_bar_links' );

    I would suggest the author update his function around ln 77 to reflect this too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Improved Simpler CSS
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic