Skip to content

Instantly share code, notes, and snippets.

@Komock
Last active August 29, 2015 14:12
Show Gist options
  • Save Komock/61ae73b9b729412e1409 to your computer and use it in GitHub Desktop.
Save Komock/61ae73b9b729412e1409 to your computer and use it in GitHub Desktop.
Add a Widget Area in GenesisFramework WordPress Theme
<?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