Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable Admin Bar on Selected Blogs

Viewing 2 replies - 1 through 2 (of 2 total)

  • Ivan Ong
    Participant

    @pinobolino

    I tried to do this, but it doesn’t seem to work. can anyone help?

    <?php
    define ('BP_ROOT_BLOG', 2);
    if (blog_id!=BP_ROOT_BLOG) {
    remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );
    }
    ?>


    Brajesh Singh
    Participant

    @sbrajesh

    hi Ivan

    try this one, put it into your bp-custom.php

    function remove_bpadminbar(){
    global $current_site;
    if($current_site->blog_id!=BP_ROOT_BLOG) {
    /*if current blog is not the one on which buddypress is activated*/
    remove_action( 'wp_footer', 'bp_core_admin_bar', 8 );//remove buddypress admin bar
    }

    }
    add_action("wp","remove_bpadminbar");

    This should work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable Admin Bar on Selected Blogs’ is closed to new replies.
Skip to toolbar