Jetpack from

I recently wrote a review and introduction to Jetpack with WordPress. I today discovered that non-admins (editors, even subscribers!) could see the Jetpack menu in the WordPress Dashboard. This for me is a bit of a no no and actually cannot believe it’s there! However it is fairly simple to remove it:

add_action( 'admin_menu', 'remove_menus' );

function remove_menus(){
if( !current_user_can( 'add_users' ) ){
remove_menu_page( 'jetpack' );

Stick that in your functions.php file and you’ll see Jetpack disappear for the mere mortals!

UPDATE 14/12/2012: It seems that the original hook indicated in the Codex was incorrect and should be “admin_menu” not “admin_init”. See here. I have updated the example above.

10 thoughts on “Quick Tip: Hide Jetpack from non-admins

  • Nice, but doesn’t work for me unless I add “999” to the action, like this:
    add_action( ‘admin_menu’, ‘remove_menus’, 999 );


  • I’ve tried the tip mentioned above, but as I am not really a programmer (only create visuals) I was stumped as to where to find the mysterious “functions.php”. Having found this in …/wp-includes/ I edited it by simply placing the obove lines prior to the PHP-Tag, As it turned out, that din’t work. Meanwhile I found a plug-in allowing for the exact funtion you described. It can be found in the Wordpess Plugins-Directory under


    • The functions.php refers to a file that should be inside your theme folder. Glad you got there with a plugin.


  • I tested it with a non-admin user and although the options are gone but the menu itself is still there. Is there any way to COMPLETELY remove it?


    • I haven’t really looked at Jetpack for quite a while, I think once WP3.6 is released properly i’ll have another look.


  • I get a parse error when I add this to functions.php.
    Parse error: syntax error, unexpected T_FUNCTION

    I’m not a programmer (although I’m learning what I can). I just added this to the bottom of the file. Am I doing something wrong?



    • Sounds like you have a semi colon missing from somewhere probably on the line before the function starts. Other than that it’s hard to know what’s wrong without seeing your functions.php file


  • thanks! worked perfectly!!


  • Great tip, but shouldn’t the current_user_can function be looking for ‘install_plugins’?


    • To be honest it’s personal preferences. That works for me.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Mojowill Avatar

Who the Hell am I?

I'm Will, a full time web developer, geek and musician. I develop using PHP and MySQL and spend most of my time working with WordPress or CakePHP. When I'm not buried in code I'm gaming, cooking or writing and recording music in my studio. I like sci-fi, pancakes and coffee and am totally prepared for the zombie apocalypse...

Stalk me on these other sites...

Why not be super creepy and check me out on all these other sites, I think they call it social media?

%d bloggers like this: