I recently selected a Genesis Child Theme as the basis for a client’s new website (Going Green Pro Theme). But my design required a Home Page with widgets so that the client could easily maintain the content without compromising the look and feel. So my solution was to create a Home Page Template to add to the theme.

The steps to do so are below. To see the Home Page that we ended up with, go to the Sexton Mountain Meadows Planned Community Association’s Home Page and see the two columns of content below the main image and welcome message.

1. Register the two widget areas

Update the theme’s function.php file to add the following code:

//* Home Page additions
// located on home page one on left, one on right. Empty by default.
    register_sidebar( array(
    	'name' => __( 'Home Widget Area - Left', 'mw' ),
		'id' => 'homeleft',
		'description' => __( 'Left side home widget area', 'mw' ),
		'before_title' => '<h1 class="widget-title">',
		'after_title' => '</h1>'
	) );	
    register_sidebar( array(
		'name' => __( 'Home Widget Area - Right', 'mw' ),
		'id' => 'homeright',
		'description' => __( 'Right side home widget area', 'mw' ),
		'before_title' => '<h1 class="widget-title">',
		'after_title' => '</h1>'
	) );

2. Create two files and upload to the Theme directory

Create two files (sidebar-homeleft.php and sidebar-homeright.php) and these will be uploaded to the directory with your theme files. The filenames are important as they are specifically tied to the “id” when registering the sidebars in step #1 above.

sidebar-homeleft.php:

<?php
    /*Sidebar Home left
	 */
	if ( ! dynamic_sidebar( 'homeleft' ) ) :   
?>
		Please add content using a widget here!

<?php    endif; // end widget area ?>

sidebar-homeright.php:
<?php
    /*Sidebar Home Right
	 */ 
	if ( ! dynamic_sidebar( 'homeright' ) ) :   
?>
		Please add content using a widget here!

<?php    endif; // end widget area ?>

3. Create the Home Page template file and upload to the Theme directory

Create a new file named page_Home.php and upload it to the directory with your theme files. There is NO closing php tag included.

<?php
/**
 *
 * Template Name: Home Page
 * This file is a page template with widgets. 
 * Mosaik Web, June 2015
*/
add_action( 'genesis_after_loop', 'homeleft', 5 );
function homeleft() {
    genesis_widget_area( 'homeleft', array(
    	'before' => '<div class="homewidgets"><div class="homeleft widget-area"><div class="wrap"><?php get_sidebar("homeleft") ?>',
		'after'  => '</div></div>',
    ) );
}
add_action( 'genesis_after_loop', 'homeright', 5 );
function homeright() {
    genesis_widget_area( 'homeright', array(
		'before' => '<div class="homeright widget-area"><div class="wrap"><?php get_sidebar("homeright") ?>',
		'after'  => '</div></div></div>',
    ) );

}

genesis();

Now you are ready to use your new Home Page

To user your new Home Page, create a new page, and select the Page Template as shown. The page content will be what appears at the top, and your widgets will follow whatever you have on your Page.
HomePageTemplate

In settings under “Reading” you will need to assign your Front Page to the new Home Page

SettingsStaticHomePage

And of course it is up to you to populate the widgets. Below is our final screen shot.

sextonmountain