Sidebar Generator

Overview

Use this tool to create custom code for Sidebars with register_sidebar() function.

Usage

  • Fill in the user-friendly form.
  • Click the “Update Code” button.
  • Copy the code to your project.
  • Or save it as a snippet and share with the community.

Examples

If you are still learning how to use this tool, check out the following examples:

The function used in the code.
Add Child Themes Support.
Translation file Text Domain. Optional.
ID used in the code. Lowercase, without spaces.
Sidebar CSS class name.
Sidebar name presented in the the dashboard.
Short descriptive summary of the sidebar.
HTML to place before every widget title.
HTML to place after every widget title.
HTML to place before every widget.
HTML to place after every widget.
ID used in the code. Lowercase, without spaces.
Sidebar CSS class name.
Sidebar name presented in the the dashboard.
Short descriptive summary of the sidebar.
HTML to place before every widget title.
HTML to place after every widget title.
HTML to place before every widget.
HTML to place after every widget.
ID used in the code. Lowercase, without spaces.
Sidebar CSS class name.
Sidebar name presented in the the dashboard.
Short descriptive summary of the sidebar.
HTML to place before every widget title.
HTML to place after every widget title.
HTML to place before every widget.
HTML to place after every widget.
ID used in the code. Lowercase, without spaces.
Sidebar CSS class name.
Sidebar name presented in the the dashboard.
Short descriptive summary of the sidebar.
HTML to place before every widget title.
HTML to place after every widget title.
HTML to place before every widget.
HTML to place after every widget.
ID used in the code. Lowercase, without spaces.
Sidebar CSS class name.
Sidebar name presented in the the dashboard.
Short descriptive summary of the sidebar.
HTML to place before every widget title.
HTML to place after every widget title.
HTML to place before every widget.
HTML to place after every widget.
  Save Snippet
// Register Sidebars
function rinklefree_widgets_init() {

	$args = array(
		'id'            => 'footer-1',
		'class'         => 'footer-column',
		'name'          => __( 'Footer Column 1', 'text_domain' ),
		'description'   => __( '1st Footer Column for Widgets', 'text_domain' ),
		'before_title'  => '<h2 class="footer-widgettitle">',
		'after_title'   => '</h2>',
		'before_widget' => ' ',
		'after_widget'  => ' ',
	);
	register_sidebar( $args );

	$args = array(
		'id'            => 'footer-2',
		'class'         => 'footer-column',
		'name'          => __( 'Footer Column 2', 'text_domain' ),
		'description'   => __( '2nd Footer Column for Widgets', 'text_domain' ),
		'before_title'  => '<h2 class="footer-widgettitle">',
		'after_title'   => '</h2>',
		'before_widget' => ' ',
		'after_widget'  => ' ',
	);
	register_sidebar( $args );

	$args = array(
		'id'            => 'footer-3',
		'class'         => 'footer-column',
		'name'          => __( 'Footer Column 3', 'text_domain' ),
		'description'   => __( '3rd Footer Column for Widgets', 'text_domain' ),
		'before_title'  => '<h2 class="footer-widgettitle">',
		'after_title'   => '</h2>',
		'before_widget' => ' ',
		'after_widget'  => ' ',
	);
	register_sidebar( $args );

	$args = array(
		'id'            => 'footer-4',
		'class'         => 'footer-column',
		'name'          => __( 'Footer Column 4', 'text_domain' ),
		'description'   => __( '4th Footer Column for Widgets', 'text_domain' ),
		'before_title'  => '<h2 class="footer-widgettitle">',
		'after_title'   => '</h2>',
		'before_widget' => ' ',
		'after_widget'  => ' ',
	);
	register_sidebar( $args );

}
add_action( 'widgets_init', 'rinklefree_widgets_init' );