Community Forums › Forums › Archived Forums › Design Tips and Tricks › Insert slider or graphic above secondary nav
Tagged: secondary nav
- This topic has 6 replies, 2 voices, and was last updated 9 years, 5 months ago by GoalSetter40s.
-
AuthorPosts
-
August 2, 2015 at 11:25 am #161172GoalSetter40sParticipant
I have a primary and secondary nav. I'm using Genesis Simple Menus for page specific secondary nav. I would like to insert a slider or graphic (or perhaps the ability to use a shortcode, for a slider) above the secondary nav.
What's the best way to do this?
http://scbeach.com/caribbean-resort/interior-photos-phase-i/August 3, 2015 at 2:25 am #161216Brad DaltonParticipantIf your slider includes a function call, you can hook the function call in using any hook.
If your slider includes a short code, you can hook the short code in or hook in a new widget area and add the short code to the widget.
August 3, 2015 at 9:17 am #161269GoalSetter40sParticipantYour diagram on all the various genesis hooks is awesome. I started to make my own a few times, but never finished. I'll be using yours a a reference from now on. Thank you so much!
Perhaps you answered my question, but unfortunately I don't fully understand how to implement it. I probably didn't explain my goal well, so I'll try again.
Simply put, I want to insert some HTML code or a shortcode to "piggy back" along with the logic in the [Genesis Simple Menus] that places the page specific secondary nav. For example:
1.) For secondary nav menu01, I want image01 (or shortcode01) above that secondary nav.
2.) For secondary nav menu02, I want image02 (or shortcode02) above that secondary nav
etc.Your help is greatly appreciated!
August 3, 2015 at 10:10 am #161285Brad DaltonParticipantBecause you want to either insert HTML or use a short code, i think its best to create a new widget area. Choose the hook position using the guide i linked to and use that hook in the code i linked to.
August 3, 2015 at 12:24 pm #161305GoalSetter40sParticipantI think the hook is going to be the [genesis_header], because that's the only one that is between the primary and secondary nav. I used your position guide technique to determine this. You can see it here:
http://scbeach.com/dunes-village/overview/
The problem is, whatever I place in this hook will appear on all pages. I only want it to appear on the same pages that the secondary menu appears on, in this example, all the pages for Dunes Village. I need some logic that says:
If secondary nav is Dunes Village, use image01 in genesis_header
If secondary nav is Margate Tower, use image02 in genesis_headerI suppose I could use some conditional PHP code to check each page's ID to determine which image to display in the genesis_header.
Ideally, I would like a way to always use image01 whenever secondary nav menu01 is used and image02 whenever secondary nav menu02 is used. That way the correct image appears in the genesis_header based on what secondary nav I choose for that page.
To summarize, all pages that use the Dunes Village secondary nav will always show the image for Dunes Village, and all pages that use the Margate Tower secondary nav will always show the image for Margate Tower.
August 3, 2015 at 12:54 pm #161309Brad DaltonParticipantAugust 4, 2015 at 12:36 pm #161406GoalSetter40sParticipantI'm almost there! Thanks for much for your help.
Here's the code I'm using in the genesis_header hook:<?php if ( has_nav_menu( 'secondary' ) ) : ?> <div class="cct-resortpage-headerimagenew"><img src="/images/dunes-village/dunes-village-header-new.jpg"></div> <?php endif; ?>
What's left is to filter on the menu_id parameter, using:
array( 'menu_id' => 'menu-dunes-village', )
Here's the page:
http://scbeach.com/dunes-village/overview/I don't know enough about PHP syntax to specify a specific menu_id in the PHP code.
Your help would be greatly appreciated.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.