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 ifsearch.phpdoesn’t exist. Based on this information, I deletedsearch.phpsince default’sarchive.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
index.phpinstead ofarchive.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 ‘Search results not using archive.php’ is closed to new replies.