New widget in home stretches entire width
-
Hi,
I successfully created a new widget area in home but have a problem trying to get the widget to fit the width of content wrapper. I don’t want it stretching to the ends of the page. I don’t know whether this makes sense but please guide me on how I can span properly using class=”span12″. Note* I’m a newbie in this so I’ll need you to tell me what goes where :).
Here’s screenshot to help you get the idea.https://www.mjomba.com/?p=5119&preview=true
https://www.ads-software.com/themes/customizr/
// 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="widget my-extra-widget">', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>' )); } // Place the widget area after main wrapper in home page only add_action ('__after_main_wrapper', 'add_my_widget_area', 10); function add_my_widget_area() { if ( tc__f('__is_home') && function_exists('dynamic_sidebar') ) { dynamic_sidebar('Extra Header Widget Area'); } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘New widget in home stretches entire width’ is closed to new replies.