Create a gist now

Instantly share code, notes, and snippets.

Registering a Sidebar in WordPress
// Function to create widgetized area
function meetup_widgetized_area() {
$args = array(
'name' => __('Meetup Widgetized Area', 'sample-child'),
'id' => 'meetup-widgetized-area',
'description' => 'A sample widegetized area',
'class' => '',
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
);
register_sidebar($args);
}
// Hook into the widgets_init() function and call our function to register our widgetized area
add_action( 'widgets_init', 'meetup_widgetized_area' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment