//Add additional text to the menu title attribute add_filter( 'walker_nav_menu_start_el', 'zm_nav_menu_item', 20, 4 ); function zm_nav_menu_item( $item_output, $item, $depth, $args ) { $extra_title='Additional text'; if (strpos( $item_output, 'title=' ) ) { //If the title attribute has been added, attach $extra_title to the existing menu title attribute. return preg_replace( '/title=\"([^\"]*)\"/', 'title="\1 - '.$ extra_title.' "', $item_output, 1 ); } else { //If the title attribute is not added, add the menu title attribute consisting of the menu title and $extra_title. return str_replace( 'href=', 'title="'.$item->title.' - '. $extra_title.'" href=', $item_output ); } }