Skip to content

Instantly share code, notes, and snippets.

@torbentschechne
Last active August 29, 2015 14:17
Show Gist options
  • Save torbentschechne/db9d9765b5b6aeed1e7a to your computer and use it in GitHub Desktop.
Save torbentschechne/db9d9765b5b6aeed1e7a to your computer and use it in GitHub Desktop.
Genesis - one pager full width custom template
<?php
/*
* Template Name: Frontpage
*/
//http://www.billerickson.net/full-width-landing-pages-in-genesis/
/* Main Content */
function custom_content() {
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div class="home-content">',
'context' => 'home-content'
) );
genesis_structural_wrap( 'home-content');
echo '<ul>';
echo '<li>1</li>';
echo '<li>2</li>';
echo '<li>3</li>';
echo '</ul>';
genesis_structural_wrap( 'home-content', 'close' );
genesis_markup( array(
'html5' => '</div>',
'xhtml' => '</div>'
) );
}
add_action( 'custom_content_area', 'custom_content' );
// Add 'home-content' to structural wraps
add_theme_support( 'genesis-structural-wraps', array( 'header', 'home-content', 'footer-widgets', 'footer' ) );
// Build the page
get_header();
do_action( 'custom_content_area' );
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment