WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Menu breaks when logged in (5 posts)

  1. innernature
    Member
    Posted 2 years ago #

    http://dev.aikivictoria.ca/

    I'm using a custom menu (Appearance > Menu) on this site so I can have the top level nav items link to one of the child pages. It works, except for when I'm logged in. When I'm logged in it reverts to the default wordpress menu.

    When it's broken the "Our Dojo" link goes to the Our Dojo page:
    http://dev.aikivictoria.ca/our-dojo/

    When it's working it goes to:
    http://dev.aikivictoria.ca/our-dojo/our-practice/

    I've tried switching to the TwentyEleven theme, and it still breaks.
    I have a couple plugins installed:
    Quotes Collection
    Simple Page Ordering
    The Events Calendar
    WP-Cycle

    I've tried deactivating all of these and it still breaks.

    Any ideas? Thanks

  2. Digital Raindrops
    Member
    Posted 2 years ago #

    Compare the links or spot the difference:
    Our Dojo: aikivictoria.ca/dev/our-dojo/our-practice/
    Our Practice: aikivictoria.ca/our-dojo/our-practice/

    Tip:
    For no-page top level menu items, use the URL type as you have done, change the url:
    URL = h ttp://aikivictoria.ca/dev/our-dojo/our-practice/
    to a single hash # character
    URL = #
    HTH

    David

  3. innernature
    Member
    Posted 2 years ago #

    I just changed the url in the site settings to the subdomain, that's why those links were different.

    Even with the way you suggest, which is a good alternative, I would have to use the custom menu.

  4. innernature
    Member
    Posted 2 years ago #

    Problem solved. The Whiteboard framework that I started with as this as the nav code:

    <?php if ( is_user_logged_in() ) {
    				     wp_nav_menu( array( 'theme_location' => 'logged-in-menu' ) ); /* if the visitor is logged in, this primary navigation will be displayed */
    				} else {
    				     wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); /* if the visitor is NOT logged in, this primary navigation will be displayed. if a single menu should be displayed for both conditions, set the same menues to be displayed under both conditions through the WordPress backend */
    				} ?>
  5. innernature
    Member
    Posted 2 years ago #

    Also, under Appearance > Menus > Theme Locations there is a select box for Admin Nav.

Topic Closed

This topic has been closed to new replies.

About this Topic