Sidebar Generator

Use this tool to create custom code for Sidebars with register_sidebar() function. Fill out the form, update the code, copy the code to your theme.

The function used in the code.
Add Child Themes Support.
Translation file Text Domain. Optional.
ID used in the code. Lowercase, without spaces.
Sidebar name. A short descriptive summary of the sidebar.
CSS class name to assign to the widget HTML.
HTML to place before every title.
Default: <h2 class="widgettitle">
HTML to place after every title.
Default: </h2>
HTML to place before every widget.
Default: <li id="%1$s" class="widget %2$s">
HTML to place after every widget.
Default: </li>

// Register Sidebar
function custom_sidebar()  {
	$args = array(
		'id'            => 'unique_id',
		'name'          => __( 'Sidebar Name', 'text_domain' ),
		'description'   => __( 'Sidebar Description', 'text_domain' ),
		'before_title'  => '<h2 class="widgettitle">',
		'after_title'   => '</h2>',
		'before_widget' => '<li id="%1$s" class="widget %2$s">',
		'after_widget'  => '</li>',
	);

	register_sidebar( $args );
}

// Hook into the 'widgets_init' action
add_action( 'widgets_init', 'custom_sidebar' );