Homepage › Community Forums › Ally Theme Support › Move Navigation below Slider
Hi,
Just wondering which genesis hook I should adjust too when trying to re-position the Primary Navigation below the Slider?
// Reposition the Primary Navigation
remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ ) ;
add_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
Based on having a look at the visual hook guide there are no real hooks for moving this navigation below the slider, should this just be done using CSS?
Thanks!
Use after_header like you’re doing, but add a priority to the Slider so it shows up above the nav. You’ll have to play around with the numbers until it gets in the right spot you want.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com
Where do I set the priority? As in adjust the zindex in css? Or somewhere in the JS?
Thanks!
.slider {
background-color: #fff;
background-image: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#f2f2f2));
background-image: -webkit-linear-gradient(top,#fff,#f2f2f2);
background-image: -moz-linear-gradient(top,#fff,#f2f2f2);
background-image: -ms-linear-gradient(top,#fff,#f2f2f2);
background-image: -o-linear-gradient(top,#fff,#f2f2f2);
background-image: linear-gradient(top,#fff,#f2f2f2);
position: relative;
top: -100px;
z-index: 1;
}
.nav-primary {
clear: both;
line-height: 1;
margin: 0 auto 40px;
overflow: hidden;
width: auto;
z-index: 50;
position:relative;
top: 570px;
}
I did that, it’s working fine in Firefox but I assume it’s going to break on portability or some browsers but perhaps this will help others set me right.. I assume z-index is being totally ignored and its just the positioning values I have used that is moving things around though?
Priority should be added to the action not the css. Like this –
add_action( ‘genesis_after_header’, ‘genesis_do_nav’, 12 );
Start from 0 and keep raising the number until it gets in the position you want.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com
Thanks, gave that a go and it doesn’t seem to make much difference. Using 12 put’s it right below all the home page widgets.
Do I need to set the priority on other elements that are being displayed in that area? I had a quick look in functions.php and couldn’t really see where I would add the priority for the slider itself.
The main goal for moving the primary navigation below the slider is so the the drop downs menu items are not hidden. Not using a menu in the “Header Right” widget on this occasion.
I actually meant to start from 0 and work your way up to around 12 or so until you see the nav show up after the slider….or you could just add a priority to the slider and move it up instead to make things easier.
By the way, the slider code is inside the home.php file, if you want to try adding a priority to it instead of the other way. Either way works, I’ve done it before in the past.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com