• Hi all, ??

    So I’m using the dynamic sidebar and I’ve lost the styling on the input button – it doesn’t seem to be grabbing the searchform.php file in the relevant folder, because if I delete everything from that file, it’s still on the page. and if I delete the ‘show dynamic sidebar if present’ php from the sidebar.php, then the search displays correctly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Widgets replace the sidebar entirely. So if your sidebar.php was calling a searchform.php file, then yes, that file is not used any more.

    If you’re styling, then you need to style the elements using CSS, not by modifying the XHTML code.

    If you are using Wigdets, look in the wp-include directory for widgets.php and inside is the search form.

    I had the same problem, and I wonder why the default widgets are not using searchform.php, instead they are generating the same code again..

    Well I opened widgets.php and changed the wp_widget_search function as follows:

    <?php
    		echo $before_widget;
    		if  ( file_exists(TEMPLATEPATH . '/searchform.php')  {
    			include (TEMPLATEPATH . '/searchform.php');
    		} else {
    	?>
    			<form id="searchform" method="get" action="<?php bloginfo('home'); ?>">
    			<div>
    			<input type="text" name="s" id="s" size="15" /><br />
    			<input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" />
    			</div>
    			</form>
    	<?php
    		}
    	echo $after_widget; ?>

    And everything works fine now. Ofcourse next update to WP will most likely write over this modification so I have to change this portion everytime I update WP. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Where does the ‘dynamic sidebar’ get it’s searchform from?’ is closed to new replies.