Skip to content

Instantly share code, notes, and snippets.

@ramseyp
Created November 3, 2011 14:31
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 ramseyp/1336624 to your computer and use it in GitHub Desktop.
Save ramseyp/1336624 to your computer and use it in GitHub Desktop.
Change default settings for the Genesis Primary Sidebar
<?php
/**
* Change default settings for the Genesis Primary Sidebar
* @link https://gist.github.com/
* @param string
* @return string
*/
//Gets rid of the default Primary Sidebar
unregister_sidebar( 'sidebar' );
//Register a new Primary Sidebar but with different defaults
genesis_register_sidebar( array (
'name' => 'Primary Sidebar', /* this needs to be called Primary Sidebar */
'id' => 'sidebar', /* This id must be sidebar if you want Genesis' layout functions to work as they should */
'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">', /* What you want WordPress to output before the widget */
'after_widget' => "</div></div>\n", /* What you want WordPress to output after the widget */
'before_title' => '<p class="widgettitle">', /* What you want WordPress to output before the title text */
'after_title' => "</p>\n" /* What you want WordPress to output after the title text. If you want the new line to output, leave this wrapped in double-quotes. */
) );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment