Community Forums › Forums › Archived Forums › Design Tips and Tricks › Winning agent primary nav on homepage
Tagged: winning agent primary navigation
- This topic has 5 replies, 2 voices, and was last updated 10 years, 1 month ago by webcami.
-
AuthorPosts
-
February 26, 2014 at 5:26 pm #92573webcamiParticipant
How can I move the Primary NAV location on the homepage for the Winning agent theme? I'd like it to be above the WELCOME section (where I currently have a photo) so it is consistently BELOW the header.
Thank you for any help you can send!
http://westseattlewordpress.com/wyatt/February 27, 2014 at 12:34 am #92612Brad DaltonParticipantAdd this to your front-page.php file:
remove_action( 'genesis_after_header', 'genesis_do_nav' ); add_action( 'genesis_before_header', 'genesis_do_nav' );
Change the genesis_before_header hook position if needed
February 27, 2014 at 8:21 am #92660webcamiParticipantThank you. When I add the code above, the navigation appears ABOVE the header.
IF I REVERSE THE ACTION, IT APPEARS BELOW THE WELCOME WIDGET AREA- as it did initially:
// Add nav below header
remove_action( 'genesis_before_header', 'genesis_do_nav' );
add_action( 'genesis_after_header', 'genesis_do_nav' );THIS BIT OF CODE IS IN THE front-page.php file - COULD IT BE SOMETHING to adjust there? Thanks again!
// Add welcome widget below header
add_action( 'genesis_after_header', 'wap_welcome_bar', 5 );
function wap_welcome_bar() {genesis_widget_area( 'home-welcome', array(
'before'=> '<div class="home-welcome"><div class="wrap">',
'after' => '</div></div>',
) );}
February 27, 2014 at 8:33 am #92667Brad DaltonParticipantYou can use any hook http://genesistutorials.com/visual-hook-guide/
With any 3rd parameter for positioning priority.
You can also change the priority for the welcome widget from 5 to anything you like. Try 15.
February 27, 2014 at 8:42 am #92669webcamiParticipantHere's what I did. I added to front-page.php:
// Add nav below header
remove_action( 'genesis_before_header', 'genesis_do_nav' );
add_action( 'genesis_after_header', 'genesis_do_nav' );Then I move my photo to the SEARCH WIDGET and removed the WELCOME WIDGET CODE from front-page.php:
// Add welcome widget below header
add_action( 'genesis_after_header', 'wap_welcome_bar', 5 );
function wap_welcome_bar() {genesis_widget_area( 'home-welcome', array(
'before'=> '<div class="home-welcome"><div class="wrap">',
'after' => '</div></div>',
) );}
Finally, I moved the following code out of functions.php and into front-page.php to only have the search widget area on the homepage:
// Add search widget below header.
add_action( 'genesis_after_header', 'wap_search_bar' );
function wap_search_bar() {
genesis_widget_area( 'search-bar', array(
'before'=> '<div class="search-bar"><div class="wrap">',
'after' => '</div></div>',
) );
}So, for anyone needed help, this removed the welcome widget area, move the nav below the header and placed the search widget area on the homepage only! And all before 7am! 🙂 Brad, thanks again for your help! You got me going in the right direction!
February 27, 2014 at 9:06 am #92675webcamiParticipantOne final note: I then adjusted all references to the search-bar in the style.css file so it adjusted properly on mobile.
Media Queries
.home .search-bar {
padding-top: 30px;
} -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.