How to register sidebar in widget?

By January 25, 2012 WordPress
Add following code in your wordpress function.php file

if ( function_exists(‘register_sidebar’) ) {
    register_sidebar(array(
        ‘name’=>’Sidebar1’,
        ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
        ‘after_widget’ => ‘</li>’,
        ‘before_title’ => ‘<h2 class=”widgettitle”>’,
        ‘after_title’ => ‘</h2>’,
    ));
}

Leave a Reply

+ 24 = 34