I'm creating a personal theme based on the code and markup (but not the CSS) from the WordPress default theme. According to Template Hierarchy in the Codex,
archive.php will be used if
search.php doesn't exist. Based on this information, I deleted
search.php since default's
archive.php has an 'if' statement for search results.
Unfortunately, it doesn't seem to work that way. If I perform a search in the blog, it is definitely using
index.php instead of
archive.php. Feel free to try it yourself. Search for "lorem", and it brings you to a page with "Announcements" as the second header.
archive.php does not contain a h2 that just says "Announcements." It should read "Search Results."
Is the Codex wrong or is there likely something wrong with my setup?