Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • <?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

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

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

    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…

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

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

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar