Last active
September 15, 2016 06:11
-
-
Save neilgee/5b68ae5d5399648939d3 to your computer and use it in GitHub Desktop.
Genesis Custom Front Page - No Inner Content
This file contains 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 | |
//do not add in opening php tag | |
/** | |
* Remove Inner Home Page Content on a Genesis Theme | |
* | |
* @package Genesis Custom Front Page - No Inner Content | |
* @author Neil Gee | |
* @link https://wpbeaches.com/remove-inner-html-mark-content-genesis-home-page/ | |
* @copyright (c)2014, Neil Gee | |
*/ | |
cgp_genesis_no_content(); | |
function cgp_genesis_no_content() { | |
cgp_genesis_header(); | |
cgp_genesis_footer(); | |
} | |
//Customised Genesis Header | |
function cgp_genesis_header() { | |
do_action( 'genesis_doctype' ); | |
do_action( 'genesis_title' ); | |
do_action( 'genesis_meta' ); | |
wp_head(); //* we need this for plugins | |
?> | |
</head> | |
<?php | |
genesis_markup( array( | |
'html5' => '<body %s>', | |
'xhtml' => sprintf( '<body class="%s">', implode( ' ', get_body_class() ) ), | |
'context' => 'body', | |
) ); | |
do_action( 'genesis_before' ); | |
genesis_markup( array( | |
'html5' => '<div %s>', | |
'xhtml' => '<div id="wrap">', | |
'context' => 'site-container', | |
) ); | |
do_action( 'genesis_before_header' ); | |
do_action( 'genesis_header' ); | |
do_action( 'genesis_after_header' ); | |
//genesis_markup( array( | |
//'html5' => '<div %s>', | |
//'xhtml' => '<div id="inner">', | |
//'context' => 'site-inner', | |
//) ); | |
//genesis_structural_wrap( 'site-inner' ); | |
} | |
//Customised Genesis Footer | |
function cgp_genesis_footer() { | |
//genesis_structural_wrap( 'site-inner', 'close' ); | |
//echo '</div>'; //* end .site-inner or #inner | |
do_action( 'genesis_before_footer' ); | |
do_action( 'genesis_footer' ); | |
do_action( 'genesis_after_footer' ); | |
echo '</div>'; //* end .site-container or #wrap | |
do_action( 'genesis_after' ); | |
wp_footer(); //* we need this for plugins | |
?> | |
</body> | |
</html> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment