Community Forums › Forums › Archived Forums › Design Tips and Tricks › Outreach Home page customization
Tagged: Outreach home page
- This topic has 3 replies, 3 voices, and was last updated 10 years, 4 months ago by rayman.
-
AuthorPosts
-
December 17, 2013 at 1:25 pm #79807raymanParticipant
Hi
I would like to do 2 things with the sub nav widgets in Outreach.
1. Take them out of the site wide template and have them just on the home page.
2. Place them above the Home 1-4 widgets.How do i do this please?
ThanksDecember 18, 2013 at 12:28 am #79897nutsandboltsMemberTo show the sub footer widgets only on the homepage and move them, do this (and PLEASE make a backup of the site and/or your files before making any changes, just in case):
Find the following in functions.php and remove it:
//* Add the sub footer section add_action( 'genesis_before_footer', 'outreach_sub_footer', 5 ); function outreach_sub_footer() { if ( is_active_sidebar( 'sub-footer-left' ) || is_active_sidebar( 'sub-footer-right' ) ) { echo '<div id="sub-footer"><div class="wrap">'; genesis_widget_area( 'sub-footer-left', array( 'before' => '<div class="sub-footer-left">' ) ); genesis_widget_area( 'sub-footer-right', array( 'before' => '<div class="sub-footer-right">' ) ); echo '</div><!-- end .wrap --></div><!-- end #sub-footer -->'; } }
Then open home.php, erase the whole thing, and replace it with this:
<?php //* Add the sub footer section add_action( 'genesis_after_loop', 'outreach_sub_footer', 5 ); function outreach_sub_footer() { if ( is_active_sidebar( 'sub-footer-left' ) || is_active_sidebar( 'sub-footer-right' ) ) { echo '<div id="sub-footer"><div class="wrap">'; genesis_widget_area( 'sub-footer-left', array( 'before' => '<div class="sub-footer-left">' ) ); genesis_widget_area( 'sub-footer-right', array( 'before' => '<div class="sub-footer-right">' ) ); echo '</div><!-- end .wrap --></div><!-- end #sub-footer -->'; } } add_action( 'genesis_meta', 'outreach_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function outreach_home_genesis_meta() { if ( is_active_sidebar( 'home-featured' ) || is_active_sidebar( 'home-1' ) || is_active_sidebar( 'home-2' ) || is_active_sidebar( 'home-3' ) || is_active_sidebar( 'home-4' ) ) { remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_loop', 'outreach_home_featured' ); add_action( 'genesis_before_footer', 'outreach_home_sections', 3 ); add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); add_filter( 'body_class', 'add_body_class' ); function add_body_class( $classes ) { $classes[] = 'outreach'; return $classes; } } } function outreach_home_featured() { if ( is_active_sidebar( 'home-featured' ) ) { genesis_widget_area( 'home-featured', array( 'before' => '<div class="home-featured widget-area">' ) ); echo '</div><!-- end #home-featured-->'; } } function outreach_home_sections() { if ( is_active_sidebar( 'home-1' ) || is_active_sidebar( 'home-2' ) || is_active_sidebar( 'home-3' ) || is_active_sidebar( 'home-4' ) ) { echo '<div id="home-sections"><div class="wrap">'; genesis_widget_area( 'home-1', array( 'before' => '<div class="home-1 widget-area">', ) ); genesis_widget_area( 'home-2', array( 'before' => '<div class="home-2 widget-area">', ) ); genesis_widget_area( 'home-3', array( 'before' => '<div class="home-3 widget-area">', ) ); genesis_widget_area( 'home-4', array( 'before' => '<div class="home-4 widget-area">', ) ); echo '</div><!-- end .wrap --></div><!-- end #home-sections -->'; } } genesis();
You'll likely need to add some padding in your stylesheet since that essentially puts Home Featured right on top of the sub footer widgets.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+December 18, 2013 at 3:07 am #79919December 18, 2013 at 2:20 pm #80008raymanParticipantWorked a charm, thanks much
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.