WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bermudacloud
    Member
    Posted 1 year 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. Declan O'Neill
    Member
    Posted 1 year 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 1 year ago #

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

  4. Declan O'Neill
    Member
    Posted 1 year ago #

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

  5. scootermac
    Member
    Posted 11 months ago #

    Can't you still browse to the page? This only removes it from the navigation.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.