daneel 0 Report post Posted April 14, 2010 Hi all, whenever I use a Text Widget in my iBlog2 theme, there is an additional blank line at the bottom before the widget ends. How can I avoid this blank line? Here is a screenshot, the problem can be seen in the first and the last widgets (those are the Text Widgets): Screenshot Can anyone please help me? :-( Many thanks, Michael Share this post Link to post Share on other sites
cmunns 16 Report post Posted April 14, 2010 Can you inspect them with firebug and check for tags or empty <p> tags? I can do it if you provide a live link to the site. Share this post Link to post Share on other sites
daneel 0 Report post Posted April 14, 2010 Dear Adam, here is the URL of my site: http://michael.unfolded.com Many thanks for your help! All the best, Michael Share this post Link to post Share on other sites
daneel 0 Report post Posted April 14, 2010 Hi all, I fixed it by replacing <div class="textwidget"><?php echo $instance['filter'] ? wpautop($text) : $text; ?></div> with <!--<div class="textwidget">--><?php echo $instance['filter'] ? wpautop($text) : $text; ?><!--</div>--> in wp-includes/default-widgets.php Basically, I simply removed the div layer - that did it for me. All the best, Michael Share this post Link to post Share on other sites
daneel 0 Report post Posted April 14, 2010 Another interesting find: It appears that for the text widget the $after_widget variable is initialized to "&.n.b.s.p;</div></div>". (nbsp without the dots) This results in another line break, in case that <table> or similar elements are used in the text widget. I fixed this by adding a: $after_widget = "</div></div>"; before the echo $after_widget line. All the best, Michael ps: I realize, that this might not be the fault of the iBlog2 theme. Just wanted to share. However, I had to fix this for several widgets... Share this post Link to post Share on other sites