[Resolved] Search results not using archive.php
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.phpwill be used if
search.phpdoesn’t exist. Based on this information, I deleted
archive.phphas 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
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.phpdoes 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?
- The topic ‘[Resolved] Search results not using archive.php’ is closed to new replies.