Last active
August 29, 2016 02:52
-
-
Save neilgee/9015471 to your computer and use it in GitHub Desktop.
Genesis Remove Home Page 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 //<~ Add me in | |
add_action( 'genesis_before_content', 'ng_home_page_widgets' ); | |
/* | |
* Add the home widgets in place | |
*/ | |
function ng_home_page_widgets() { | |
genesis_widget_area ('content-1', array( | |
'before' => '<div class ="one-third first hometopcol toplefthome">', | |
'after' => '</div>',)); | |
genesis_widget_area ('content-2', array( | |
'before' => '<div class ="one-third hometopcol topmiddlehome">', | |
'after' => '</div>',)); | |
genesis_widget_area ('content-3', array( | |
'before' => '<div class ="one-third hometopcol toprighthome">', | |
'after' => '</div>',)); | |
genesis_widget_area ('content-4', array( | |
'before' => '<div class ="one-third first bottomlefthome ">', | |
'after' => '</div>',)); | |
genesis_widget_area ('content-5', array( | |
'before' => '<div class ="two-thirds bottomrighthome">', | |
'after' => '</div>',)); | |
} | |
genesis(); |
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 //<~ don't add me in | |
add_action( 'widgets_init', 'ng_genesis_home_widgets' ); | |
/* | |
* Add in Home Widget Areas | |
*/ | |
function ng_genesis_home_widgets() { | |
genesis_register_sidebar( array( | |
'name' => __( 'Home Content Top Left', 'genesis' ), | |
'id' => 'content-1', | |
'description' => __( 'Top Left Home', 'genesis' ), | |
) ); | |
genesis_register_sidebar( array( | |
'name' => __( 'Home Content Top Middle', 'genesis' ), | |
'id' => 'content-2', | |
'description' => __( 'Top Middle Home', 'genesis' ), | |
) ); | |
genesis_register_sidebar( array( | |
'name' => __( 'Home Content Top Right', 'genesis' ), | |
'id' => 'content-3', | |
'description' => __( 'Top Right Home', 'genesis' ), | |
) ); | |
genesis_register_sidebar( array( | |
'name' => __( 'Home Bottom Left Side', 'genesis' ), | |
'id' => 'content-4', | |
'description' => __( 'Home Left', 'genesis' ), | |
) ); | |
genesis_register_sidebar( array( | |
'name' => __( 'Home Bottom Right Side', 'genesis' ), | |
'id' => 'content-5', | |
'description' => __( 'Home Right', 'genesis' ), | |
) ); | |
} | |
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 <?php //<~ don't add me in | |
/** | |
* Remove Home Page Loop | |
* | |
* @package Remove Home Page Loop | |
* @author Neil Gee | |
* @link http://wpbeaches.com/creating-widgetized-genesis-home-page/ | |
*/ | |
add_action( 'genesis_before','remove_homepage_content' ); | |
function remove_homepage_content() { | |
if (is_front_page() ) { | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment