Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I disable adminbar for all users?

  • Hello Maybe someone knows how to disable admin bar in BadiPress. Plug this did not cope. When BadiPress is not enabled, disable the plugin admin bar, and as soon as the plug-ins badipress disable admin bar stop working. Tell me what to do? I really want to disable the admin bar.
    Thank you. And sorry for my english. I translate through Google translator :)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Nothing is clear, following the transfer of Google translator. Bad …

    I need to disable the admin bar, or even delete it.

    Hi, all you have to do is go to Appearance > Editor (in your Dashboard sidebar) and go to the file “functions.php”.

    There, enter the following code: `add_filter(‘show_admin_bar’, ‘__return_false’);`

    Thank you for your reply. Now try. Just say, and write directly to the so – add_filter(‘show_admin_bar’, ‘__return_false’);
    Or need some signs or something else, or here in this form to insert into the page code??
    1…..
    2….
    3… add_filter(‘show_admin_bar’, ‘__return_false’);
    4…

    <?php

    add_filter(‘show_admin_bar’, ‘__return_false’);
    /**
    * BP-Default theme functions and definitions
    *
    * Sets up the theme and provides some helper functions. Some helper functions
    * are used in the theme as custom template tags. Others are attached to action and
    * filter hooks in WordPress and BuddyPress to change core functionality.

    I put your code in functions.php my themes, but nothing changes: (Example above.

    <?php

    /**
    * Admin Bar
    *
    * This code handles the building and rendering of the press bar.
    */

    /**
    * Instantiate the admin bar object and set it up as a global for access elsewhere.
    *
    * To hide the admin bar, you’re looking in the wrong place. Unhooking this function will not
    * properly remove the admin bar. For that, use show_admin_bar(false) or the show_admin_bar filter.
    *
    * @since 3.1.0
    * @access private
    * @return bool Whether the admin bar was successfully initialized.
    */
    function hide_admin_bar() {
    return false;
    }
    add_filter( ‘show_admin_bar’, ‘hide_admin_bar’ );

    function _wp_admin_bar_init() {
    global $wp_admin_bar;

    if ( ! is_admin_bar_showing() )
    return false;

    /* Load the admin bar class code ready for instantiation */
    require( ABSPATH . WPINC . ‘/class-wp-admin-bar.php’ );

    /* Instantiate the admin bar */
    $admin_bar_class = apply_filters( ‘wp_admin_bar_class’, ‘WP_Admin_Bar’ );
    if ( class_exists( $admin_bar_class ) )
    $wp_admin_bar = new $admin_bar_class;
    else

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I disable adminbar for all users?’ is closed to new replies.
Skip to toolbar