Widget area between slider and navbar
-
I’ve added the PHP code to add the extra widget area between slider and navbar which I haven’t used so far as it doesn’t look great when I insert anything as it is always the full width.
How can I make it so it is the same width and responsive like the slider and navbar so it doesn’t stick out?
Secondly, how can I make it only on the front page rather than on all the pages, same like it works for the widget are after the FPs?
The code I have is this:
// Adds a widget area after the header// 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="widget my-extra-widget">', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>' )); } // Place the widget area after the header add_action ('__after_header', 'add_my_widget_area', 10); function add_my_widget_area() { if (function_exists('dynamic_sidebar')) { dynamic_sidebar('Extra Header Widget Area'); } } // end of widget area after the header//
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Widget area between slider and navbar’ is closed to new replies.