Adding 2 or 3 widget area
-
Is it possible to add 2 or 3 widget area?
I tried this tutorial:
http://presscustomizr.com/snippet/add-widget-area-header/
and I added some lines of code:// Adds a widget area. if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Extra Header Widget Area', 'id' => 'extra-widget-area', 'description' => 'Extra widget area after the header', 'before_widget' => '<div class="row-fluid"> <div class="span8">', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>' )); } // Adds a widget area2. if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Extra Header Widget Area 2', 'id' => 'extra-widget-area-2', 'description' => 'Extra widget area after the header', 'before_widget' => '<div class="span4">', 'after_widget' => '</div></div>', 'before_title' => '<h2>', 'after_title' => '</h2>' )); } // Place the widget area after the header add_action ('__before_fp', 'add_my_widget_area', 10); function add_my_widget_area() { if (function_exists('dynamic_sidebar')) { dynamic_sidebar('Extra Header Widget Area'); dynamic_sidebar('Extra Header Widget Area 2'); } }Unfortunately does not work well.
Whenever I add a widget, it adds a new widget areaPS: sorry for my bad English
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
The topic ‘Adding 2 or 3 widget area’ is closed to new replies.
