Community Forums › Forums › Archived Forums › Design Tips and Tricks › Outreach Pro: remove header on homepage only?
- This topic has 3 replies, 2 voices, and was last updated 11 years, 1 month ago by
styzer.
-
AuthorPosts
-
October 30, 2014 at 2:20 pm #129931
styzer
ParticipantHi,
I installed a slider on my client's homepage, and the client would prefer that the header not be there too. I searched the forum and tried a few ideas I found, but nothing worked either as CSS, in Genesis Settings or functions.php. I'm sure there is a way to do this, but I ran out of ideas.
How do you hide the header ONLY for the homepage in Outreach Pro? The menu should stay, though.
And then, is it possible to move that menu underneath the slider? So it would be like on the homepage only, the slider would replace the header.
Thanks in advance!
Andre
October 31, 2014 at 12:26 am #129966WisdmLabs
MemberHi,
To remove the header only on home page, add the following code to your functions.php
add_action( 'genesis_before_header', 'wdm_remove_header_home' ); function wdm_remove_header_home() { if ( ! is_front_page() ) { return; } remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); remove_action( 'genesis_header', 'genesis_do_header' ); remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); }Remove the navigation menu using
(Primary Nav)
<?php remove_action( 'genesis_after_header', 'genesis_do_nav' ); ?>In your template add the menu at the desired place using
<?php wp_nav_menu( array('menu' => 'Menu Nav' )); ?>
October 31, 2014 at 10:19 am #130018styzer
ParticipantThis totally worked! Thanks!
Now as for removing the menu, that too worked. But the Outreach theme doesn't have a template file, so I don't see where I could include the code to move it elsewhere?
I'd like to move both the navigation and the scrolling ticker and place them under the slider. I pasted the code in the Genesis settings "header and footer scripts," under the ticker script, but that didn't work.
Any more ideas?
Thanks again!
Andre
October 31, 2014 at 10:51 am #130021styzer
ParticipantI see, I did ask the question before, how to reposition the navigation above the header. This code shows how to do it via the functions.php file:
//* Reposition the primary navigation menu remove_action( 'genesis_after_header', 'genesis_do_nav' ); add_action( 'genesis_before_header', 'genesis_do_nav' );What qualifier should I use to "add_action" in order to move the menu "above the container" (site-inner) so that it will always be under both the slider and the menu?
I'm thinking it would be something like:
//* Reposition the primary navigation menu remove_action( 'genesis_after_header', 'genesis_do_nav' ); add_action( 'genesis_before_xxxxxxx', 'genesis_do_nav' );I tried "container" and "site-inner" but I'm thinking it's probably not be the right description.
Any help much appreciated... 🙂
Andre
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.