Remove Jetpack menu page

Remove the Jetpack menu page for users who can't "manage_options" or any WordPress role you would like to set.

I recently moved my WordPress plugin marketplace to a new domain; I’m in the process of cleaning up client/users dashboards in the admin area, and had to remove a few menu items that we’re not necessary for the subscriber role.

Since subscribers can’t do anything on the Jetpack page, why should it be there? Here is the snippet I put in my core plugin file to remove Jetpack menu page.

if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) {
	remove_menu_page( 'jetpack' );

Just add that into a function that gets called on admin_menu really late like so:

function ap_remove_jetpack_page( ) {
	if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) {
		remove_menu_page( 'jetpack' );
add_action( 'admin_menu', 'ap_remove_jetpack_page', 999 );

💁🏽‍♂️ Husband to Jeana.
⚾️ Dodgers obsessed.
💻 WordPress Engineer.
🌱 Hydroponic Gardner.
🍿 Plex nerd.
🚙 '15 WRX & '66 Corvette C2.
🐶 Missing my love Keiki; RIP 😢.

Follow me on Twitter @TheFrosty & Instagram @TheFrosty.

Articles: 288


  1. Nice little plugin!

    To answer your question (and zeaks’), the Jetpack menu is there so that each registered user can connect to their account and enable notifications.

    This way, if they also have a site, or if they are members of multiple Jetpack sites, they can receive notifications and reply to comments from any site.

    No worries though, they won’t be able to changes your Jetpack settings, or disable any module.

  2. Any idea WHY the priority must be set so high? I had it set to 100, then 500 and finally 999 before it would work for jetpack. I got it to work with other menus at a much lower priority. It wasn’t until I found your post that I thought to set it to 999. Not sure the logic behind this and wonder if you have any idea.

  3. “No worries though, they won’t be able to changes your Jetpack settings, or disable any module.”

    Then why don’t they show only what they need to see ?

  4. Un-freakin-believable. Why Jetpack would make it available to subscribers? This confuses subscribers, who don’t know what WordPress is, let alone Jetpack. Jetpack creators, get out of your little bubble. If it weren’t for your stats feature, I would gotten rid of your plugin a while back.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: