Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Last active August 29, 2015 14:20
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 reasonstousegenesis/3e28fffa848755682fdc to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/3e28fffa848755682fdc to your computer and use it in GitHub Desktop.
Register a sidebar with Genesis
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Register a sidebar with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/register-sidebar/
*/
add_action( 'widgets_init', 'rtug_register_sidebar' );
function rtug_register_sidebar() {
genesis_register_sidebar( array(
'id' => 'sidebar-post',
'name' => 'Post Sidebar',
'description' => 'This sidebar displays on Posts but not Pages.'
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment