I'm updating a site to use Search API (with Search API DB) instead of the built-in search module. I've set up my Search API server and search, indexed everything, and now am just trying to replace the old search box with the new one in the theme.
But I can't find any way to do this.
Before disabling the built in search module, there was only one search block. After disabling, there are none, including after clearing caches. According to Integrate core search block with search_api and Solr and various other sources, I should get a search block automatically, but I don't.
Before, I got the search box into my template .tpl file with <?php print render($search_box); ?>
. After, this throws an error.
I can't find anything on what to use instead, and the relevant documentation page about search forms talks only about search results pages, not about how to put a search box on other pages. I'm confused at how hard it is to find how to do something so basic. I can't find anything about how to find the code to either populate this variable in template.php or access any inbuilt template variable.
How do I show a basic search block on the front page that integrates with search api? is similar but the asker reports its answer doesn't work, and I'm not fussy about whether it's specifically a block or specifically on the front page or connected to a view, I just want the search input element.
How do I add a Search API search box to a theme? How do I make it generate the block or load the search box from code?