On my existing website, there is a search box at the top of the page.
My understanding is that it's from this code in header.php
<div id="search_sec">
<?php dynamic_sidebar('search');?>
</div>
which, as I understand, calls a sidebar that is registered in functions.php
register_sidebar(array(
'id' => 'search',
'name'=>'Search',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => ''
)
);
But these lines are only for displaying stuff and does not contain anything that actually calls a search function, presumably at searchform.php
Can you please help me understand the connection from header.php to searchform.php?
Furthermore, if I rename the sidebar ID from "search" to "search1" and call dynamic_sidebar("search1"), nothing is displayed. Am I missing something?
Thanks for your help!