您可以使用wordpressnodes 自定义配置文件菜单。
Add this in functions.php
add_action( \'admin_bar_menu\', \'remove_my_account\', 999 );
function remove_my_account( $wp_admin_bar ) {
$wp_admin_bar->remove_node( \'my-account\' );
}
add_action( \'admin_bar_menu\', \'add_logout\', 999 );
function add_logout( $wp_admin_bar ) {
$args = array(
\'id\' => \'logout\', // id of the existing child node (New > Post)
\'title\' => \'Logout\', // alter the title of existing node
\'parent\' => \'top-secondary\', // set parent
);
$wp_admin_bar->add_node( $args );
}