Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide the main nav bar from visitors

  • @addd4567

    Participant

    Can anyone help me hide the navigation bar from people visiting the site? I don’t want users to be able to see the forums, groups, activity and members till they registrar/login to the site then I want the navigation to appear.

Viewing 6 replies - 1 through 6 (of 6 total)
  • @addd4567

    Participant

    Sorry forgot to mention WordPress V.3.51 BuddyPress 1.6.4

    @amanor

    Participant

    I am watching this post because I need the answer too.

    @chouf1

    Participant

    hi @amanor, @addd4567

    you have to create a child theme to di this correctly.

    Then add /bp-default/header.php to /your-child/header.php
    Line 42 is a php content who begins by wp_nav…..

    At the begin of the line, just after the php opening tag, add
    if (  is_user_logged_in()  ):
    wp_nav_content…. bla bla…

    and at the end of the line, just before the php closing tag, add endif;

    The nav bar is now hidden for any not logged in visitor

    @addd4567

    Participant

    Thanks Chouf I will give that ago.

    @amanor

    Participant

    Thank you Chouf. I am using wmpu’s Holder BP theme, with the block style selected. In my header.php file, I only find wp_title and wp_head.

    @chouf1

    Participant

    @amanor,

    don’t know your theme, sorry !
    Remind that it’s a premium theme with Unlimited Live & Q&A Support from the WordPress experts, for anything to do with WordPress at all!
    So you have to ask the “experts” at wpmu dev. Support is price included…. i guess.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide the main nav bar from visitors’ is closed to new replies.
Skip to toolbar