Skip to content

How To Hide Jetpack From Non-Admin Users

If you ever logged into your WordPress website with a subscriber profile, you’d notice that subscribers can also access Jetpack modules by simply connecting to their WordPress.com profiles.

Here’s trick which will allow you to hide Jetpack from non-admin users of your WordPress. It will just remove the menu, but they can still access it from the direct link.

Just add following code snippet to your website (or directly to your current theme’s functions.php file):

function hide_jetpack() { if (!current_user_can('manage_options')) { remove_menu_page( 'jetpack' ); } } add_action('jetpack_admin_menu', 'hide_jetpack');
Code language: JavaScript (javascript)

2 thoughts on “How To Hide Jetpack From Non-Admin Users”

Leave a Reply

Your email address will not be published.