Adding Secondary Navigation to Pages.
Support Area › Forums › Foxy › Adding Secondary Navigation to Pages.
Tagged: foxy
- This topic has 10 replies, 4 voices, and was last updated 12 years ago by Jessica Cheung.
-
AuthorPosts
-
May 22, 2012 at 11:51 #6089Nicholas MinnichParticipant
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!
May 22, 2012 at 16:25 #6094Bill RobbinsModeratorNicholas,
Thanks for sending the link. You can add another navigation menu to your food pages. Here’s how to do that:
- Go to the appearance section and select edit to open up the theme editor.
- From the list of files on your right, choose functions.php
- 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' ), ) );
- Save your changes.
- Next edit taxonomy-menu-group.php
- 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:
- Save your changes.
- 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; }
- 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,
BillMay 23, 2012 at 20:10 #6111Nicholas MinnichParticipantPerfect! 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.
May 24, 2012 at 11:04 #6115Nicholas MinnichParticipantNever mind. It was a simple adjustment of bottom padding on the stylesheet. This theme is extraordinary and the support is outstanding. Thank you!
June 5, 2012 at 15:14 #6290Nicholas MinnichParticipantWhen 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?
June 5, 2012 at 18:44 #6291Bill RobbinsModeratorI’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,
BillJune 6, 2012 at 17:53 #6319Nicholas MinnichParticipantThe 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.
June 28, 2012 at 04:02 #6618Nacho Grijuela GonzalezParticipanthi bill,
I’ve done everything you say in this post, but… where do I modify that secondary navigation menu?Than U
June 28, 2012 at 04:03 #6619Nacho Grijuela GonzalezParticipantby the way…
http://lamalinchesantander.com/menu/carta/June 28, 2012 at 07:53 #6620Bill RobbinsModeratorOnce 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,
BillNovember 25, 2012 at 22:42 #8435Jessica CheungParticipantHi 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!
-
AuthorPosts
- The topic ‘Adding Secondary Navigation to Pages.’ is closed to new replies.