Mayccoll
1/7/2016 - 8:54 PM

Register Widget Area

Register Widget Area

<?php
/** ············································································
 * Register widgetized area
 */

function THEME_register_widget_area() {

	register_sidebar( array(
		'name'          => __( 'Principal', 'reemo' ),
		'id'            => 'principal-1',
		'before_widget' => '<section id="%1$s" class="widget %2$s">',
		'after_widget'  => '</section>',
		'before_title'  => '<h3 class="widget-title">',
		'after_title'   => '</h3>',
	) );

	register_sidebar( array(
		'name'          => __( 'Sidebar', 'reemo' ),
		'id'            => 'sidebar-1',
		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
		'before_title'  => '<h3 class="widget-title">',
		'after_title'   => '</h3>',
	) );
}
add_action( 'widgets_init', 'theme_register_widget_area' );

Register Widget Area

  1. Register the widget area in function.php.