Title: Admin Menu
Last modified: August 21, 2016

---

# Admin Menu

 *  Resolved [akiprod](https://wordpress.org/support/users/100tral/)
 * (@100tral)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/)
 * Thanks for this plugin !
    I would like to hide admin menu for non admin users…
   I have try `remove_submenu_page( 'users.php?page=jr_ps_settings' );` and more
   without success. Any ideas are welcome : )
 * [http://wordpress.org/plugins/jonradio-private-site/](http://wordpress.org/plugins/jonradio-private-site/)

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

 *  [jon](https://wordpress.org/support/users/adiant/)
 * (@adiant)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548665)
 * I’ll be back in the office within 3 hours where I need to test to answer your
   question.
 *  [jon](https://wordpress.org/support/users/adiant/)
 * (@adiant)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548753)
 * Do you wish to hide the Profile pages of Admin where the User can change his/
   her password, and add info about him/herself?
 * If you can live with the User seeing their Profile and a really minimal Dashboard,
   then you could assign a Role of Subscriber to each non-Admin User, and WordPress
   will do it all for you.
 * I also want to be sure that you are aware of the Landing Location setting that
   the plugin provides. For example, setting Where to after Login? to Go to Site
   Home. Then, a user would have to type site.com/wp-admin to get to the Admin panels.
 * Let me know if these ideas are enough. If not, I’ll be glad to discuss it further.
 *  Thread Starter [akiprod](https://wordpress.org/support/users/100tral/)
 * (@100tral)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548767)
 * Thanks for your reply !
    We can manage your plugin preferences from 2 sections:
   1. Settings (/wp-admin/options-general.php?page=jr_ps_settings) 2. Users (/wp-
   admin/users.php?page=jr_ps_settings) I would like to hide your plugin preferences
   from the USERS submenu to prevent any other admin user to change config. My function.
   php is :
 *     ```
       /* —————————————————————————————————————————————————————————————————————————————————————
       	 * 	REMOVE ADMIN MENU ITEMS based on username
       	 * ————————————————————————————————————————————————————————————————————————————————————— */
       		if (!function_exists('remove_admin_menu')):
       		function remove_admin_menu()
       	{
   
       	    // provide a list of usernames who can edit custom field definitions here
       	    $admins = array(
       	        'user1',
       	        'user2'
       	    );
   
       	    // get the current user
       	    $current_user = wp_get_current_user();
   
       	    // match and remove if needed
       	    if( !in_array( $current_user->user_login, $admins ) )
       		{
   
       				remove_menu_page('plugins.php'); // Plugins
       				remove_menu_page('tools.php'); // Tools
       				remove_menu_page('options-general.php'); // Settings
       				// Remove Plugins
       				remove_menu_page('edit.php?post_type=acf'); //ACF
       				remove_menu_page('wpcf7'); //WP ContactForm7
       				remove_submenu_page('users.php?page=jr_ps_settings'); //jonradio Private Site
   
       	    }
   
       	}
       		add_action( 'admin_menu', 'remove_admin_menu', 999);
       		endif; // remove_admin_menu
       ```
   
 * Cheers
 *  [jon](https://wordpress.org/support/users/adiant/)
 * (@adiant)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548774)
 * Now I understand!
 * Be back soon with a solution (or two).
 *  [jon](https://wordpress.org/support/users/adiant/)
 * (@adiant)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548786)
 * Thought about it, took a look at the relevant code in the plugin, and looked 
   at what you are doing. My preference would be to include another checkbox setting
   on the plugin’s Settings page that determines whether the plugin’s Settings page
   is an entry in the Users menu.
 * As for your function.php code, I haven’t tested it, but the Codex says that remove_submenu_page()
   requires a second parameter.
 * Please let me know if you would like the new Setting to be added to the plugin.
 *  Thread Starter [akiprod](https://wordpress.org/support/users/100tral/)
 * (@100tral)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548811)
 * I’d love to have this new setting available in your plugin : )
    Thanks again 
   and again !!!!
 *  [jon](https://wordpress.org/support/users/adiant/)
 * (@adiant)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548895)
 * Version 2.10 is now available to address this need.
 * It took longer than usual because of odd issues on the Settings page, but they
   seem to be fully resolved now.
 * For security reasons, the new Setting can only be modified from the Settings 
   page that is a submenu of the Settings menu in the WordPress Admin menus. It 
   would not make sense to allow someone from the Users submenu to change their 
   own access.

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

The topic ‘Admin Menu’ is closed to new replies.

 * ![](https://ps.w.org/jonradio-private-site/assets/icon-256x256.png?rev=3370795)
 * [My Private Site](https://wordpress.org/plugins/jonradio-private-site/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jonradio-private-site/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jonradio-private-site/)
 * [Active Topics](https://wordpress.org/support/plugin/jonradio-private-site/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jonradio-private-site/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jonradio-private-site/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [jon](https://wordpress.org/support/users/adiant/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/admin-menu-5/#post-4548895)
 * Status: resolved