Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Brad, in header.php locate this:

    <?php if ( has_nav_menu('topbar') ): ?>

    Change to:

    <?php if ( has_nav_menu('topbar') && is_user_logged_in() ): ?>

    The problem is that there will be an empty space there as the “topbar-enabled” css class is still there.

    So in functions.php, locate:

    if ( has_nav_menu('topbar') ) { $classes[] = 'topbar-enabled'; }

    Replace with:

    if ( has_nav_menu('topbar') && is_user_logged_in() ) {	$classes[] = 'topbar-enabled'; }

    Preferably with a child theme (See how to work with a child theme in theme options help dropdown, under “Child Theme”)

    The code has not been tested but should work I think.

    Thread Starter Bradley Davis

    (@bmdumr02)

    It worked perfect. Thank you for an awesome theme and great support!

    Hi,
    Sorry to dig this one up again.

    I would like to have a different menu in the header and footer for logged in and logged out users, but keep the topbar menu as is. Is this possible?

    Thanks
    Michael.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Only Show Topbar Menu to Logged in User’ is closed to new replies.