WordPress.org

Ready to get started?Download WordPress

Forums

Ho to remove wordpress logo/pages from admin bar? (4 posts)

  1. unseenmagik
    Member
    Posted 2 years ago #

    The wp admin bar on the front and backend of the site has a wordpress logo on it with links to the forums and a few other pages.

    How do I remove this entire submenu?
    Ok, i have found this code but i dont know where to put it. ?

    function annointed_admin_bar_remove() {
            global $wp_admin_bar;
    
            /* Remove their stuff */
            $wp_admin_bar->remove_menu('wp-logo');
    }
    
    add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);

    Any help please, what file do i add this piece of code too ?

    information was found here: http://wordpress.org/support/topic/filter-to-remove-wordpress-logopages-from-admin-bar

    Thanks
    Ben

  2. Put it in your theme's function.php OR make a plugin.

    Also this is not an alpha/beta question (which today would mean you're using 3.4). Moving to general.

  3. 5ngua
    Member
    Posted 1 year ago #

    after installing the plugin (on WP MS 3.41) and reactivating it, I receive this message: The plugin generated 1 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Do you have any idea?

  4. 5ngua
    Member
    Posted 1 year ago #

    oh, no one can give it a thought? This is my plugin code, I hope I am doing well please advise me:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <?php
    /*
    Plugin Name: Remove Adminbar Logo
    Plugin URI: http://domain.com/URI_Of_Page_Describing_Plugin_and_Updates
    Description: Remove Adminbar Logo
    Version: The Plugin's Version Number, e.g.: 1.0
    Author: Name Of The Plugin Author
    Author URI: http://domain.com/
    License: A "Slug" license name e.g. GPL2
    */
    
    function annointed_admin_bar_remove() {
            global $wp_admin_bar;
    
            /* Remove their stuff */
            $wp_admin_bar->remove_menu('wp-logo');
    }
    
    add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.