Last active
August 29, 2015 14:17
-
-
Save torbentschechne/db9d9765b5b6aeed1e7a to your computer and use it in GitHub Desktop.
Genesis - one pager full width custom template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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