Adding Secondary Navigation to Pages.

Support Area Forums Foxy Adding Secondary Navigation to Pages.

Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
URL to the page in question:
  • Author
    Posts
  • #6089
    Nicholas Minnich
    Participant

    I want to add a secondary navigation menu inside the actual page template. Like this page (does not use foxy):http://www.bluegrillhouse.com/menu/brunch

    I know Foxy has the hover over feature on the sidebar to reveal the child pages, but I do not particullary want to use it.

    The site in development is nickdimitriostestsite.com

    Plugin? Custom Page Template Code? Anything?

    Thanks!

    #6094
    Bill Robbins
    Moderator

    Nicholas,

    Thanks for sending the link. You can add another navigation menu to your food pages. Here’s how to do that:

    1. Go to the appearance section and select edit to open up the theme editor.
    2. From the list of files on your right, choose functions.php
    3. Look for this spot:
      
      register_nav_menus( array(
      'side' => __( 'Sidebar Navigation', 'organizedthemes' ),
      'mobile' => __( 'Mobile Navigation', 'organizedthemes' ),
      ) );
      

      and replace it with this:

      
      register_nav_menus( array(
      'side' => __( 'Sidebar Navigation', 'organizedthemes' ),
      'mobile' => __( 'Mobile Navigation', 'organizedthemes' ),
      'food' => __( 'Food Navigation', 'organizedthemes' ),
      ) );
      
    4. Save your changes.
    5. Next edit taxonomy-menu-group.php
    6. Just after this:
      
      <?php
           $taxonomy = 'menu-group';
           $queried_term = get_query_var($taxonomy);
           $terms = get_terms($taxonomy, 'slug='.$queried_term);
                if ($terms) {
                    foreach($terms as $term) {
                         echo '<h1>  ' . $term->name .  '</h1> ';
                    }
                 }
      ?>
      


      paste this:

    7. Save your changes.
    8. Lastly open up style.css and scroll down to the very bottom and paste this:
      
      .food {
      	overflow: hidden;
      	padding-left: 20px;
      	margin-top: 16px;
      }
      
      .food li {
      	margin-right: 14px;
      }
      
    9. Save your changes.

    That will give you a new navigation menu that will only appear on your "food-group" pages.

    If you run into any trouble, let me know,
    Bill

    #6111
    Nicholas Minnich
    Participant

    Perfect! Look’s awesome. One more small thing:

    How can I add some more space between lines of text on my site?

    Specifically I am working on: http://nickdimitriostestsite.com/?menu-group=lunch

    BUT I would like the whole site body copy to have a little more space between text lines.

    #6115
    Nicholas Minnich
    Participant

    Never mind. It was a simple adjustment of bottom padding on the stylesheet. This theme is extraordinary and the support is outstanding. Thank you!

    #6290
    Nicholas Minnich
    Participant

    When I implemented this, it worked. Quick style question….

    How can I get the link to the current navigation link only to display a different color?

    For example if I am on the lunch menu, how do I make “lunch” orange but Dinner Desserts and Cocktails white?

    http://nickdimitriostestsite.com/?menu-group=lunch

    #6291
    Bill Robbins
    Moderator

    I’m glad that worked for you. You can edit the style.css file again and paste this at the bottom to change the current menu item to orange:

    
    ul#menu-food-navigation li.current-menu-item a {
    	color: #e45631;
    }
    

    If you run into any trouble, let me know,
    Bill

    #6319
    Nicholas Minnich
    Participant

    The color worked. Thanks. However, I am in the testing phase and the secondary navigation menu you suggested seems to be working on desktop and windows phone, but not on iPhone.

    #6618

    hi bill,
    I’ve done everything you say in this post, but… where do I modify that secondary navigation menu?

    Than U

    #6619
    #6620
    Bill Robbins
    Moderator

    Once you’ve added all the code, you can set it up by going to Appearance > Menu and creating a new navigation menu for that section. Just add the menu groups that you’d like to include and arrange them. Then save the menu and assign it to the new “Food Navigation” menu location.

    If you have any trouble, let me know,
    Bill

    #8435
    Jessica Cheung
    Participant

    Hi Bill,

    Is it possible to have these secondary navigation menus, but different ones for different subpages? Right now it looks like every page that has food items listed will list the same food navigation.

    So something like having the menu > lunch > and then a submenu of different lunch categories?

    Thanks for the help!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Adding Secondary Navigation to Pages.’ is closed to new replies.