Function that hides an admin menu item from an Editor? (1 post)

  1. keithwlogan
    Posted 3 years ago #


    I'm looking for help on how to write a function that would hide an item from within the dashboard for a user with an Editor role. I'm using the WooCommerce plugin and wanted to hide the WooCommerce menu items from any user that has an Editor role.

    I would prefer not to use a plugin.

    I found another post with more or less what I'm looking for: http://wordpress.org/support/topic/how-do-i-add-css-to-admin-backend-to-displaynone-specific-menu-items?replies=14

    function custom_colors() {
    global $user_level;
    if ($user_level != '10' ) {
    echo '<style type="text/css">
    /* Styles here! */

    add_action('wp_head', 'custom_colors');

    I've tried using this but it doesn't seem to work, does anyone know if this needs to be adjust for the latest version of WP 3.5?

    Can anyone help on this please?



Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic