Last active
August 29, 2015 14:12
-
-
Save Komock/61ae73b9b729412e1409 to your computer and use it in GitHub Desktop.
Add a Widget Area in GenesisFramework WordPress Theme
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 a Widget After Header | |
genesis_register_sidebar( array( | |
'id' => 'widget-id', | |
'name' => __( 'Widget Name', 'genesis' ), | |
'description' => __( 'This is the Widget After Header', 'genesis' ), | |
) ); | |
add_action( 'genesis_after_header', 'add_new_widget' ); | |
function add_new_widget() { | |
{ | |
echo '<div class="custom-wrap">'; //* Delete if you don't need this | |
dynamic_sidebar( 'widget-id' ); | |
echo '</div>'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment