Forums

[resolved] [closed] filter to remove wordpress logo/pages from admin bar? (8 posts)

  1. Anointed
    Member
    Posted 6 months 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?

  2. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 6 months ago #

    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);
  3. Anointed
    Member
    Posted 6 months ago #

    thank you Ipstenu

  4. mokito
    Member
    Posted 3 months ago #

    this is on the ssl or php ?

  5. a4jp.com
    Member
    Posted 2 months ago #

    You can copy and paste the code Ipstenu wrote above into the function.php of your theme if you like. If you add it to a child theme it will keep working even if you update as well.

    Just go to wp-content>themes>then the name of the theme you want to remove the logo from

    <?php
    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);

    ---------------------the rest of your code below that.

    Glen Charles Rowell

  6. Ipstenu
    Half-Elf Support Rogue & Mod
    Posted 2 months ago #

    Or put it in a .php file in your mu-plugins folder ;)

    Works gangbusters and isn't theme dependent.

  7. pranshavs
    Member
    Posted 1 month ago #

    Didn't worked for me. this is my functions.php http://pastebin.com/pgvKL9uk

  8. pranshavs - Make a new topic. And unless you're seeing this not work ONLY in 3.4, you should put it in the normal troubleshooting section.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.