Title: Jetpack Menu reference by code
Last modified: August 22, 2016

---

# Jetpack Menu reference by code

 *  Resolved [z](https://wordpress.org/support/users/murenti/)
 * (@murenti)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/)
 * Hello,
    Can you please tell me the name that is used to reference the Jetpack
   Menu. I have tried “Jetpack” and “jetpack” but I am unable to located anything
   further.
 * I hope you understand what I mean, sorry for any confusion. I am looking for 
   the code reference to the menu please. 🙂
 * [https://wordpress.org/plugins/jetpack/](https://wordpress.org/plugins/jetpack/)

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

 *  Thread Starter [z](https://wordpress.org/support/users/murenti/)
 * (@murenti)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/#post-5222231)
 * To help you understand please see the code below.
 * /**
    * Remove unwanted menus in dashboard */ function remove_menus () { global
   $menu; $restricted = array(__(”), __(‘jetpack’)); end ($menu); while (prev($menu)){
   $value = explode(‘ ‘,$menu[key($menu)][0]); if(in_array($value[0] != NULL?$value[
   0]:”” , $restricted)){unset($menu[key($menu)]);} } } add_action(‘admin_menu’,‘
   remove_menus’); ?>
 *  Plugin Contributor [csonnek](https://wordpress.org/support/users/csonnek/)
 * (@csonnek)
 * Happiness Rocketeer 🚀
 * [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/#post-5222486)
 * When you want to “remove unwanted menu” – in what context are you trying to remove
   it? Once I have that information, I’ll be better able to answer the question.
 *  Thread Starter [z](https://wordpress.org/support/users/murenti/)
 * (@murenti)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/#post-5222490)
 * Hi,
    Thank you for responding I do appreciate it 🙂 The details: 1) I am not 
   a programmer but I dabble, sorry if I don’t get it the first time. 2) The code
   above references menu id and in this case “adminmenu” 3) It then hides the admin
   menu <div class=”wp-menu-name”>Dashboard</div> 4) If I place “Dashboard” into
   the following line $restricted = array(__(‘Dashboard’)); ….it Hides the “Dashboard”
   from the backend menu list on the left. 5) The problem is I want to also hide“
   Jetpack” menu in the same manner but when adding $restricted = array(__(‘Jetpack’));…..
   the “Jetpack” menu item remains.
 * I am not sure why and was wondering if you might be able to or inclined to offer
   any help please? I also understand that this is not your plugin and you May ask
   me to speak to the plugin guy and I have only just thought of this, sorry. But
   if you can offer any easy suggestion to fix it now, I will be very grateful.
 * 🙂 🙂 <—— 2 Really smiley faces
 *  Plugin Contributor [csonnek](https://wordpress.org/support/users/csonnek/)
 * (@csonnek)
 * Happiness Rocketeer 🚀
 * [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/#post-5222494)
 * Jetpack is “my plugin” so the question was asked in the correct place.
 * Is there a reason you’re not taking advantage of existing plugins that are doing
   exactly what you seek? This particular plugin will hide the Jetpack menu item(
   and all other menu items) if you choose:
    [https://wordpress.org/plugins/admin-menu-editor/](https://wordpress.org/plugins/admin-menu-editor/)
 * Note: hiding the menu will remove your ability to configure and manage the settings
   in Jetpack and is not recommended.
 * If you want to hide menu items using your own code, I highly suggest studying
   that plugin to see how they’re doing it as we don’t advocate hiding menu items
   because those items provide functionality to your site’s backend.
 * I hope that clarifies things! Marking as resolved.
 *  Thread Starter [z](https://wordpress.org/support/users/murenti/)
 * (@murenti)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/#post-5222495)
 * I love Jetpack but I wanted to manipulate the menu showing for each level of 
   user login access.
 * The plugin you suggested is excellent, many thanks. I did not know it existed
   until you suggested it.
 * Thanks for your help.
 *  Plugin Contributor [csonnek](https://wordpress.org/support/users/csonnek/)
 * (@csonnek)
 * Happiness Rocketeer 🚀
 * [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/#post-5222498)
 * Glad I could help!

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

The topic ‘Jetpack Menu reference by code’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [csonnek](https://wordpress.org/support/users/csonnek/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/jetpack-menu-reference-by-code/#post-5222498)
 * Status: resolved