I need this to work in wordpress. I know there is a search function already, and there are plugins I am sure. but I need this to work. When I try to get it working, I get an error saying call to undefined function. Get header.php. I put the search box in the sidebar then tried putting the code to run the search in the search.php and then set the action to the search.php. But it don’t work. Can you help?
I’m not sure I understand the problem. What is the goal? To have the search results appear in the sidebar when you do a search? You might be able to do it with an iframe or something so that the page you are currently viewing doesn’t have to reload. Otherwise you’ll have to make the action URL something like "/", which will return you to the homepage with the search results. Or use PHP to grab the current URL and plop that in as the action URL, so a search submit returns you to the current page.