Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove the Log In, Register bar at top of front page.


  • Kookidooki
    Participant

    @kookidooki

    Hey guys,

    How do I remove at the top of the frontpage (when you’re not logged in) the dark bar which contains “Log In”, “Register” and the Search box?

    But I still need the admin bar for administrative purposes.

    I would like to remove this bar, because I already have Login and Register in the menu of my Buddypress site.

    See image http://imgur.com/lfjtsPL

Viewing 6 replies - 1 through 6 (of 6 total)
  • Place this code in bp-custom.php or functions.php of your theme.

    if ( ! is_super_admin() ) {
        add_filter( 'show_admin_bar', '__return_false' );
    }

    Kookidooki
    Participant

    @kookidooki

    Thank you!

    It works fine, but when a (non-administrator) user is logged in, they cannot log out anymore because the logout button is missing which you can find in the “Howdy… [name][avatar][settings][logout button]” box at the upper right side. Also missing is the name of the user with his avatar, messages / notifications, etc. So this box is missing.

    So what I need is a script that hides the admin bar on the front end when you’re logged out, but is visible when you’re logged in.

    Any idea?

    ThanX!

    Install (BuddyPress) Log in widget in sidebar. It will have both login form and logout link.
    http://screencast.com/t/J37U1SgxRb


    Kookidooki
    Participant

    @kookidooki

    Hi Slava,

    Thank you!

    I have a different theme and layout than yours. No sidebars.

    Need a small simple script that shows only admin bar when you’re logged in.

    I’m not a coder but I need something like this:

    if user is logged in => show admin bar.

    if ( ! is_user_logged_in() ) {
        add_filter( 'show_admin_bar', '__return_false' );
    }

    Kookidooki
    Participant

    @kookidooki

    YES!!!

    That did the trick! It works.

    Thank You so much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to remove the Log In, Register bar at top of front page.’ is closed to new replies.
Skip to toolbar