Created
August 30, 2015 01:18
-
-
Save neilgee/9b7e9ce1d2558bd33cf5 to your computer and use it in GitHub Desktop.
Genesis Home Page
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 in Wrap Content Widget Areas | |
function genesischild_fullwrap_widgets() { | |
if(is_home() && is_front_page()) { | |
register_sidebar( array( | |
'name' => __( 'TopWrap', 'genesis' ), | |
'id' => 'topwrap', | |
'description' => __( 'TopWrap', 'genesis' ), | |
'before_widget' => '<div class="wrap topwrap">', | |
'after_widget' => '</div>', | |
) ); | |
register_sidebar( array( | |
'name' => __( 'OptinWrap', 'genesis' ), | |
'id' => 'optinwrap', | |
'description' => __( 'OptinWrap', 'genesis' ), | |
'before_widget' => '<div class="wrap optinwrap">', | |
'after_widget' => '</div>', | |
) ); | |
register_sidebar( array( | |
'name' => __( 'BottomWrap', 'genesis' ), | |
'id' => 'bottomwrap', | |
'description' => __( 'BottomWrap', 'genesis' ), | |
'before_widget' => '<div class="wrap botwrap">', | |
'after_widget' => '</div>', | |
) ); | |
} | |
} | |
add_action( 'widgets_init', 'genesischild_fullwrap_widgets' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could also do something like this for
before_widget
:Then you can filter the before widget classes
There's also genesis_widget_area which I think does something similar to that extent.