Site logo

[Support request] How to hide Elements in admin bar?

Home Forums Support [Support request] How to hide Elements in admin bar?

Home Forums Support How to hide Elements in admin bar?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2444139
    Robert

    ..or disable it in the WordPress admin bar, without deactivating elements?

    #2444845
    David
    Staff
    Customer Support

    Hi there,

    try adding this PHP Snippet:

    
    add_action('wp', function(){
        remove_action( 'admin_bar_menu', 'generate_add_elements_admin_bar', 100 );
    });
    #2445119
    Robert

    Does not seem to work, I tried in function.php of child theme and snippets-plugin.

    #2445127
    David
    Staff
    Customer Support

    Thats odd, i tested it ok.
    How about just adding this:

    remove_action( 'admin_bar_menu', 'generate_add_elements_admin_bar', 100 );

    #2445157
    Robert

    this one works, thanks.

    Generally, btw., I think it should be an easy to switch off option.

    #2445293
    David
    Staff
    Customer Support

    You’re welcome.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.