I have never used Google ads, but I believe this is a great way to create a front page with 5 posts - Google Ads - 5 posts - Google Ads.
Create a new blank text file and call it home.php and copy and paste this code into it (or download: [download id="1"]).
[php]<?php get_header(); ?>
<?php genesis_home(); ?>
<div id="home-top-bg">
<div id="home-top">
<div class="home-top">
<?php if (!dynamic_sidebar('Home Top')) : ?>
<div class="widget">
<h4><?php _e("Home Top", 'genesis'); ?></h4>
<p><?php _e("This is a widgeted area which is called Home Top. It is using the Genesis - Featured Posts widget to display desired posts. To get started, log into your WordPress dashboard, and then go to the Appearance > Widgets screen. There you can drag the Genesis - Featured Posts widget into the Home Top widget area on the right hand side.", 'genesis'); ?></p>
</div>
<?php endif; ?>
</div><!-- end .home-top -->
<div class="home-google-ad-area-1">
<?php if (!dynamic_sidebar('Google Ad Area 1')) : ?>
<div class="widget">
<h4><?php _e("Google Ad Area 1", 'genesis'); ?></h4>
<p><?php _e("This is a widgeted area which is called Google Ad Area 1. Use the text widget to move Google Ad information into this area. To get started, log into your WordPress dashboard, and then go to the Appearance > Widgets screen. There you can drag the Text widget into the Google Ad Area 1 widget area on the right hand side.", 'genesis'); ?></p>
</div>
<?php endif; ?>
</div><!-- end .home-google-ad-area-1 -->
<div class="home-bottom">
<?php if (!dynamic_sidebar('Home Bottom')) : ?>
<div class="widget">
<h4><?php _e("Home Bottom", 'genesis'); ?></h4>
<p><?php _e("This is a widgeted area which is called Home Bottom. It is using the Genesis - Featured Posts widget to display desired posts. To get started, log into your WordPress dashboard, and then go to the Appearance > Widgets screen. There you can drag the Genesis - Featured Posts widget into the Home Bottom widget area on the right hand side.", 'genesis'); ?></p>
</div>
<?php endif; ?>
</div><!-- end .home-bottom -->
<div class="home-google-ad-2">
<?php if (!dynamic_sidebar('Google Ad Area 2')) : ?>
<div class="widget">
<h4><?php _e("Google Ad Area 2", 'genesis'); ?></h4>
<p><?php _e("This is a widgeted area which is called Google Ad Area 2. Use the text widget to move Google Ad information into this area. To get started, log into your WordPress dashboard, and then go to the Appearance > Widgets screen. There you can drag the Text widget into the Google Ad Area 1 widget area on the right hand side.", 'genesis'); ?></p>
</div>
<?php endif; ?>
</div><!-- end .home-google-ad-area-2 -->
</div><!-- end #home-top -->
</div><!-- end #home-top-bg -->
<?php get_footer(); ?>[/php]
Then register the widget sidebars by adding the following to your functions.php.
[php]// Register widget areas
genesis_register_sidebar(array(
'name'=>'Home Top',
'id' => 'home-top',
'description' => 'This is the top post section of the homepage.',
'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Home Bottom',
'id' => 'home-bottom',
'description' => 'This is the bottom post section section of the homepage.',
'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Google Ad Area 1',
'id' => 'home-google-ad-area-1',
'description' => 'This is the first Google ad section of the homepage.',
'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
'name'=>'Google Ad Area 2',
'id' => 'home-google-ad-area-2',
'description' => 'This is the second Google ad section of the homepage.',
'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));[/php]
Keith Davis says
Hi Travis
I Googled “how to set up a widgetised home page for genesis prose theme” and landed here.
Almost what I was looking for but not quite.
I’m pretty good with html and CSS but have no PHP, but have been trying to get to grips with registering sidebars etc.
Do you have a tutorial on “how to set up a widgetised home page for genesis prose theme”?
Thanks
Travis Smith says
Hello Keith,
At this time, I do not have a tutorial on this; however, I will try to write one in the next week.
Thanks,
Travis
Keith Davis says
Hi Travis
Thanks for your reply.
I picked the Prose theme because it has a standard blog index as the home page so I thought that setting up a widgeted home page for that theme would apply to almost any theme.
Easy to set up a blog index on any theme, guess all the themes have a blog template.
I’ve read a few of Nick the Geeks articles on thye vStudiopress forum so I’m getting the idea of Register and then Display sidebars – only just learnt that Sidebar refers to any widgeted area.
Brian Gardner has also written a short post along those lines.
http://www.briangardner.com/home-widget-area-eleven40/
No rush on the tutorial Travis, but I’m sure that a lot of non coders who use Genesis would find it useful to add a custom home page with widfeted areas to a blog style theme.
Affan Ruslan says
Nothing so special with these codes. Basically it just tells you to create home.php file by registering widgetized areas. Do you know how to put adsense between post in BLOG template? The problem when using the home.php template is that the post navigation won’t show up
Michelle Cullison says
Thank you!!! With your help, I widgetized the Home page of the Prose theme.