Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I disable adminbar for all users?

  • Avatar of foobool
    foobool
    Member

    @foobool

    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)
  • Avatar of foobool
    foobool
    Member

    @foobool

    Nothing is clear, following the transfer of Google translator. Bad …

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

    Avatar of RRobson
    rrobson-wp
    Member

    @rrobson-wp

    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’);`

    Avatar of foobool
    foobool
    Member

    @foobool

    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…

    Avatar of foobool
    foobool
    Member

    @foobool

    <?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.

    Avatar of foobool
    foobool
    Member

    @foobool

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

    Avatar of foobool
    foobool
    Member

    @foobool

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

You must be logged in to reply to this topic.