Add a new widget area
-
Hi..
I’m having trouble adding a new widget area to my theme. So far I have two and they have been installed as such
/*-----------------------------------------------------------------------------------*/ /* Enable Widgetized sidebar /*-----------------------------------------------------------------------------------*/ function mts_widgets_init() { register_sidebars(array( 'name'=>'Sidebar', 'id' => 'sidebar', 'description' => __( 'Appears on posts and pages', 'mythemeshop' ), 'before_widget' => '<li id="%1$s" class="widget widget-sidebar %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3>', 'after_title' => '</h3>', )); } add_action( 'widgets_init', 'mts_widgets_init' ); /*-----------------------------------------------------------------------------------*/ /* Enable Widgetized Footer /*-----------------------------------------------------------------------------------*/ if ( function_exists('register_sidebar') ) register_sidebar(array( 'name'=>'Footer', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>', ));However I’d like to add another to the header. I have read a number of blogs on adding new widget areas though the methods suggested either don’t work or break the theme. Any help would be much appreciated… thanks!
The topic ‘Add a new widget area’ is closed to new replies.