Registration Now Open: Spring Break & Summer Camps! SIGN-UP
Kinder club: School readiness for 3, 4, and 5-year olds! SIGN-UP
Celebrate Play: Join us for a Silver Spectacular Gala! TICKETS
Search
Close this search box.

Added a function to hide CPT RR Website Notes from all users except the RR team. The function includes an array of RR team email addresses for user validation.

function remove_menu_items() {
$current_user = wp_get_current_user();
    if(  !in_array( $current_user->user_email, array(‘wla@therunningrobots.com’, ‘tif@therunningrobots.com’, ‘sean@therunningrobots.com’, ‘tim@therunningrobots.com’, ‘peter@therunningrobots.com’, ‘miranda@therunningrobots.com’, ‘michelle@therunningrobots.com’, ‘laura@therunningrobots.com’, ‘larissa@therunningrobots.com’, ‘jay@therunningrobots.com’, ‘domains@therunningrobots.com’ ) ) ) {
remove_menu_page( ‘edit.php?post_type=rr-website-note’ );
}
}
add_action( ‘admin_menu’, ‘remove_menu_items’ );