Return to Snippet

Revision: 66730
at June 25, 2014 17:44 by daprela


Initial Code
<?php

function my_sidebar() {
	register_sidebar( array(
		'name' => __( 'Sidebar', 'theme' ),
		'id' => 'widget-1',
		'description' => 'This is a sidebar',
		'class' => 'content',
		'before_widget' => '<div id="widget-1" class="widget widget-1">',
		'after_widget' => "</div></div>",
		'before_title' => '<div class="widget-title">',
		'after_title' => '</div><div class="widget-content">',
	) );
}
add_action( 'widgets_init', 'my_sidebar' );

Initial URL

                                

Initial Description
This code must be added to functions.php in the child theme

Initial Title
Register a new sidebar

Initial Tags

                                

Initial Language
PHP