You can use wordpress nodes to customize profile menu.
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 );
}
Related Posts:
- How to override admin-bar style
- How to fix a theme with page.php Default Template that accidentally deleted?
- How to change menu icon which is overriden (i.e. by WooCommerce) [closed]
- Selective Product Category for Carousel
- “options.php” not found
- WP Enqueue Script Error
- us states dropdown function and echo in theme template files
- How to pass a variable from a template page to the child theme functions.php
- Which template file to edit to edit homepage in Mystile [closed]
- My website is generating weired url parameters of paginated pages
- remove_action on after_setup_theme not working from child theme
- Adding fields to the “Add New User” screen in the dashboard
- Is there any global functions.php file which works for any theme?
- Displaying the number of updates available in the Admin area
- What’s the difference between admin_url() and get_admin_url() functions?
- How to influence the information displayed on widget inside wp-admin
- How do I create a new WP admin color scheme?
- wp_get_attachment_image returns different image size
- Passing variables to templates (alternatives to globalizing variables)
- Load post with a different template?
- Replacing select2 in admin backend for all selects
- difference between add_object_page and add_menu_page
- WordPress Change Post Templates,but not drop down, but Image selection
- Target a certain page within wordpress backend (admin) i.e. Pages > About
- Child Theme Not Overriding Parent Theme
- Dequeue script in template isn’t working
- Help to resolve Syntax error, unexpected ‘endwhile’ (T_ENDWHILE) [closed]
- How to add a column to the Trash page?
- Adjust which tempalte a page uses with a function?
- Theme-Config tab in admin Pannel?
- Is It wrong to use oop approach on functions.php?
- PHP files included in functions.php don’t seem to work
- Removing the main link to Jetpack from the menu
- Display Password Protected external RSS in wordpress template
- Hook specific functions if on a specific admin page
- How to enable template page only for a post id page
- How to change login labels
- Modify a function without editing template
- functions.php mistakenly deleted
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Child Theme files – what is needed?
- Problem only while using require_once() within functions.php
- How to stop twenty fifteen theme from cropping featured images?
- Theme functions.php file auto delete everyday [closed]
- How to remove style attribute in WordPress RSS output?
- How to force field validation first, then its values saved durning edit profile?
- Move ‘current-menu-item’ class on #adminmenu li from Posts to Pages for Taxonomy Edit Screen
- How to auto refresh when user change postcode
- Is there an alternative to get_template_directory_uri()?
- create filter in functions.php
- Add Custom Background Properties to Customizer
- How to install Segment on WordPress without a plugin
- Parse error after modifying the template menu [closed]
- Get First Child Page ID or Permalink in WordPress Admin
- WordPress PHP Conflicting User Sessions
- Wp admin – Set default value to 999 in comments
- Function that outputs second theme url
- Remove “Published On” inside wp-admin
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- Need print logo without any ID & class
- Not all CSS elements transferring via parent to child?
- unnecessary request call for js and css after calling wp_dequeue_script
- Define PHP variable from a seperate API if statement
- Run a jquery script on on a certain template page
- Filter nav menu items HTML tags and wrap inner text with span
- error at login page in wordpress
- Add a field into a shortcode of an extension
- Getting the teaser text without overriding global variables
- Specify multiple categories for custom post template – FATAL ERROR
- Default Nav Highlight
- Update to functions.php not showing in dashboard
- Best way to disable sidebars on posts (only)?
- How to override this theme function in child theme
- get_template_directory() – references parent theme directory
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- How do I preserve changes to a theme’s functions.php across updates?
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- Prevent creating multiple image resizes in twentytwelve template
- What function actually renders the wp_admin_bar ? How can I call it?
- Simplest Way to Build Custom Archives Page?
- How to change a meta value (of a published post) after X days.?
- Display ACF category image on archive and single template files
- Render page with specific id from functions.php
- How to add custom metakey to shop_order page’s searching function?
- How to require a config file in a template and in function.php?
- Header menu aligned right on all pages except for single-post page [closed]
- CSS style and app.js not loading
- Insert Modal on user first login
- Setting Up Child Theme To Take Priority
- Shortcode Initialization in a Custom Theme
- More than one search results page template for two searches on site
- admin-ajax.php & my wp-admin folder url showing in header
- Javascript and Stylesheet in child page
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- Shortcode to output get_header not working
- How does child theme functions.php work with parent theme functions.php? Is it like CSS? [duplicate]
- Add custom css to theme
- How to get postId from the argument $block when register_block_type()?
- How to store page-{id}.php templates in custom folder
- Setcookie not setting cookies anywhere except admin