How to make your “Balance black” theme “widget-friendly” +

Ok, today I started playing around with the plugins a bit, and wanted to use the widgetized sidebar here on my blog. Once I turned on the widgetized version in the admin interface, and put the proper blocks in place, the search block was messed up and it didn’t look exactly like it should.

A couple of minutes later, I changed the html that is generated in the widgets.php file to match the output that the theme’s css file is expecting.

Here’s the modified function to replace the function of the same name in wp-includes/widgets.php of your WP installation:

function wp_widget_search($args) {
		<?php echo $before_widget; ?>
			<form id="searchform" method="get" action="<?php bloginfo('home'); ?>">
			        <div class="field">
			            <input type="text" class="input_text" name="s" id="s" size="15" />
			            <input type="image" alt="<?php echo attribute_escape(__('Search')); ?>" src="<?php bloginfo('home'); ?>/wp-content/themes/balance-black/i/s.gif" id="searchsubmit" class="input_image" />
		<?php echo $after_widget; ?>

Also, here’s a handy wp_widget_search.diff file against the default 2.3.2 wp-includes/widgets.php

Comments are closed.