Skip to content

Instantly share code, notes, and snippets.

@scottlyttle
Last active December 12, 2015 02:48
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 scottlyttle/4701423 to your computer and use it in GitHub Desktop.
Save scottlyttle/4701423 to your computer and use it in GitHub Desktop.
Basic implementation to register a new sidebar in WordPress (place in functions.php)
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name' => __('Sidebar Widgets','themename' ),
'id' => 'sidebar-widgets',
'description' => __( 'These are widgets for the sidebar.','themename' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment