• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Remove Different Admin Menu Links For A Specific User Profile

This PHP code enables you to replace the user@email.com address with the registered email address of a specific user and remove the menu links they don’t need access to for the moment.

The very last line of code in the Gist includes the action to remove access to all the Genesis theme framework settings if you’re using this great design framework.

Please copy ALL the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++

And here’s the before and after results.

remove wp admin menu items

Remove Plugins Admin Menu

Here’s an example of how to remove the menu link for Jetpack for specific users.

Prefer a Plugin?

There’s many good plugins which enable you to do the same thing like Advanced Access Manager.

Sources:

http://codex.wordpress.org/Function_Reference/wp_get_current_user
https://codex.wordpress.org/Plugin_API/Action_Reference/admin_menu
http://codex.wordpress.org/Function_Reference/remove_menu_page

Related Content

  • Beginners Guide To User Roles & Capabilities in WordPress
  • Remove Admin Menu Links for the WordPress SEO Plugin

Roles & Capabilities

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems