if role is logged in then do something
Something like this would be more efficient. This is basic PHP by the way, not WP specific. function add_extra_item_to_nav_menu( $items, $args ) { $roles = [ ‘administrator’ => [ //Role – slug name ‘SCHOOL_NAME-A’, //url path – appended to the end ‘ADMIN’, // can be any name – appended to SHOP NOW button ], ‘ROLEABC’ … Read more