Sidebar widget area adding extra p and br tags
-
I wanted to include a plugin widget for searching a google map to my header. I registered a sidebar in my functions.php file using this code:
if ( function_exists('register_sidebar') ){ register_sidebar(array( 'name' => 'front_page_header', 'id' => 'front_page_header', 'before_widget' => '<div id="fpheadersearch">', 'after_widget' => '</div>', 'before_title' => '', 'after_title' => '', )); }
Then I added this (in a page through the add page in admin):
<?php /* Widgetized sidebar */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('front_page_header') ) : ?> <?php endif; ?>
I successfully added my sidebar and then added the widget to it. The widget shows up but doesn’t show horizontally like it does when I add it to other side bars in my template. This time, the widget (which is a search [code]<form>[/code] stacks up vertically instead of laying out nicely horizontally.
When I use firebug to view the code, there are extra p tags and br tags added, if I delete these tags through firebug, the widget lays out horizontally. Is there something in the sidebar or widget area that is adding the extra p and br tags?
The page can be found here: wwwDOT monroebrandsDOTcom / tests/ gmaps
- The topic ‘Sidebar widget area adding extra p and br tags’ is closed to new replies.