When your website means business.

PHP, WP/CP | Type: PHPRemove Items from WP/CP Admin Bar

// Remove items from the admin bar
function remove_from_admin_bar($wp_admin_bar) {
     * Placing items in here will only remove them from admin bar
     * when viewing the fronte end of the site
    if ( ! is_admin() ) {
        // Example of removing item generated by plugin. Full ID is #wp-admin-bar-si_menu
        // WordPress Core Items (uncomment to remove)
     * Items placed outside the if statement will remove it from both the frontend
     * and backend of the site
add_action('admin_bar_menu', 'remove_from_admin_bar', 999);

Reference Links

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Cookies Notice