Home › Community Forums › Ally Theme Support › Move Navigation below Slider
- This topic has 6 replies, 2 voices, and was last updated 9 years, 4 months ago by
Eric.
-
AuthorPosts
-
September 11, 2013 at 12:38 am #7315
Jamie
CustomerHi,
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!
September 11, 2013 at 1:05 pm #7329Eric
CustomerUse 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
September 17, 2013 at 12:05 am #7458Jamie
CustomerWhere do I set the priority? As in adjust the zindex in css? Or somewhere in the JS?
Thanks!
September 17, 2013 at 12:42 am #7459Jamie
Customer.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?
September 19, 2013 at 11:26 am #7486Eric
CustomerPriority 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
September 25, 2013 at 4:09 am #7606Jamie
CustomerThanks, 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.
September 25, 2013 at 10:24 pm #7633Eric
CustomerI 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
-
AuthorPosts
- You must be logged in to reply to this topic.