WordPress.org

Forums

Jetpack - remove visibility for non admins in dashboard (4 posts)

  1. bermudacloud
    Member
    Posted 6 months ago #

    Hello.

    I would like to make Jetpack visible in the dashboard only to site administrators. At this time all user levels including subscribers are able to see it.

    Thank you

    Mark M.

  2. declanon
    Member
    Posted 3 months ago #

    Hi bermudacloud,

    The following code from http://www.mojowill.com/developer/quick-tip-hide-jetpack-from-non-admins/ worked for me. Just paste it in your functions.php file.

    add_action( 'admin_menu', 'remove_menus' );
    
    function remove_menus(){
    if( !current_user_can( 'add_users' ) ){
    remove_menu_page( 'jetpack' );
    }
    }
  3. pgale2
    Member
    Posted 3 months ago #

    That code throws a Fatal Error for me in the functions file.

  4. declanon
    Member
    Posted 3 months ago #

    pgale2, where on the functions page are you pasting the snippet? I pasted the code on the second to last, line just before ?>

Reply

You must log in to post.

About this Topic

Tags

No tags yet.