Exploring the Genesis Framework

Exploring the Genesis FrameworkIf you’ve ever used WordPress you probably know about premium themes and frameworks. This post is related to the Genesis Framework by StudioPress.

I have just purchased the Genesis Framework and am exploring the options available to create your own “child themes”. Being new to WordPress I found their system to be quite easy to learn and adapt to your needs.

Genesis uses “child themes” to extend the framework for styling purposes. With as little as a new style sheet you can create your own theme for your Genesis installation. If you want to change the layout options simply create your own functions file in php to modify how the framework functions.

I started by looking at one of the free child themes available. In this example I started with the “Fairway” child theme and wrote a new functions.php file that:

  • Moved the main navigation to the top of the page above the header.
  • Added a new page template called “home” that forced the main landing page into a 3 column format.
  • Added support for 3 footer widgets.

Here is what I have added to my functions.php file:

// Force layout on homepage
add_filter('genesis_pre_get_option_site_layout', 'tgcdesign_home_layout');
function tgcdesign_home_layout($opt) {
	if ( is_home() )
    $opt = 'content-sidebar-sidebar';
	return $opt;
}

// Register widget areas
genesis_register_sidebar(array(
	'name'=>'Homepage',
	'id' => 'homepage',
	'description' => 'This is the featured column of the homepage.'
));

/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );

The contents of home.php is as follows:

<?php get_header(); ?>

<?php genesis_before_content_sidebar_wrap(); ?>
<div id="content-sidebar-wrap">

	<?php genesis_before_content(); ?>
	<div id="content" class="hfeed">

		<div id="homepage">
			<?php if (!dynamic_sidebar('Homepage')) : ?>
				<div class="widget">
					<h4><?php _e("Homepage", 'genesis'); ?></h4>
					<div class="wrap">
						<p><?php _e("This is a widgeted area which is called Homepage. It is using the Dynamic Content Gallery plugin and the Genesis - Featured Posts widget to display what you see on the Education child theme demo site. To get started, you'll need to download the plugin from the link given in the Education child theme's README file. Then log into your WordPress dashboard, and then go to the Appearance > Widgets screen. There you can drag the Dynamic Content Gallery widget and the Genesis - Featured Posts widget into the Homepage widget area on the right hand side.", 'genesis'); ?></p>
					</div><!-- end .wrap -->
				</div><!-- end .widget -->
			<?php endif; ?>
		</div><!-- end #homepage -->

	</div><!-- end #content -->
	<?php genesis_after_content(); ?>

</div><!-- end #content-sidebar-wrap -->
<?php genesis_after_content_sidebar_wrap(); ?>

<?php get_footer(); ?>

The rest of the requirements for my child theme are contained in the style sheet.

Based upon what I have seen so far it is quite easy to develop spectacular child themes with little effort. With the addition of some recommended plugins, Genesis can easily handle any web project you have in mind.

Comments

  1. Pretty great post. I just stumbled upon your blog and wished to mention that I have really enjoyed browsing your blog posts. After all I will be subscribing in your rss feed and I am hoping you write again soon!

    • Thanks for your support,
      I’ve been busy learning the ropes with Genesis. It’s given me quite a few more ideas to report so you’ll probably see some soon…

  2. I am also using genesis with news child theme.Genesis is very easy to learn,I am still learing it 🙂

    • I’m very happy I started learning WordPress with Genesis. I like to design more than anything and so far I’ve been able to build quite a few child themes. I may start offering some for download here soon.