Skip to content

Instantly share code, notes, and snippets.

@hirejordansmith
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirejordansmith/188c9480fd762797db7a to your computer and use it in GitHub Desktop.
Save hirejordansmith/188c9480fd762797db7a to your computer and use it in GitHub Desktop.
Register a Genesis Sidebar and Output
<?php
genesis_register_sidebar( array(
'id' => 'widget-slug',
'name' => __( 'Widget Location Title', 'child_theme_name' ),
'description' => __( 'Widget Location Description.', 'child_theme_name' ),
));
// an example of how to output the registered sidebar to a specific theme location
add_action( 'genesis_after_content', 'home_bottom_section' );
function home_bottom_section() {
echo '<div class="bottom-section">';
dynamic_sidebar( 'widget-slug' );
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment