How can I add the search to the header?
-
Knowing little about PHP, I tried adding this code to my header:
<?php
function wp_widget_search($args) {
extract($args);
?>
<?php echo $before_widget; ?>
<form id=”searchform” method=”get” action=”<?php bloginfo(‘home’); ?>”>
<div>
<input type=”text” name=”s” id=”s” size=”15″ />
<input type=”submit” value=”<?php echo attribute_escape(__(‘Search’)); ?>” />
</div>
</form>
<?php echo $after_widget; ?>
<?php
}
?>And probably unsurprisingly I got a fatal error. ??
Can anyone tell me how to add the search functionality to somewhere other then the sidebar?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How can I add the search to the header?’ is closed to new replies.