• I did some searching in WP support, but ended up scratching my head…

    I want archive.php to be used to display search results, but currently if I disable search.php, WP defaults to index.php to show the results. How can I get round this?

    PS I have read about some confusion in the WP documentation about the default search template. Is it, in fact:

    1 search.php
    2 index.php

    or

    1 search.php
    2 archive.php
    3 index.php

    ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Dunno…. but why not just set up a Page for search results which uses the archive template? If you don’t want to do that, just copy the content of the archive template to the search template.

    Thread Starter snoogly

    (@snoogly)

    Yes, I could just copy it over to search.php, but I am trying to simplify everything by using archive.php for as much as I can.

    Well, there’s simplification which works, and simplification which gives you results which not only don’t work, but are not at all what you’re looking for.

    Since neither page setup takes much room, there’s not much reason to refuse to do what works.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Confused! I need search results to appear in archive.php, but how?’ is closed to new replies.