Last active
August 29, 2015 14:01
-
-
Save rfmeier/c8a49daa3831da4e0771 to your computer and use it in GitHub Desktop.
Add widget area to genesis_entry_footer
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 | |
genesis_register_sidebar( array( | |
'id' => 'genesis-box', | |
'name' => __( 'Genesis Box', 'themename' ), | |
'description' => __( 'This is a widget area that can be placed after the post', 'themename' ), | |
) ); | |
add_action( 'genesis_entry_footer', 'sp_genesis_box', 9 ); | |
/** | |
* Callback for Genesis Framework 'genesis_entry_footer' action. | |
* | |
* @return void | |
*/ | |
function sp_genesis_box() { | |
if ( is_single( ) ) | |
genesis_widget_area( 'genesis-box', array( | |
'before' => '<div class=”genesis-box widget-area”>', | |
'after' => '</div>', | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment