• I can’t understand how search works. I have a template that I designed myself and I’ve added the wordpress code for the searchform, but it just goes to my main page and shows no results.

    If I point it at search.php it also goes to the main page and shows no results. I don’t get it. I can’t get it to do anything but just go to the main page and show nothing.

    Can I point a search form on my main page at a search page of my design and have it show results? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You don’t really need to mess around with that. WP knows better than you which template file to use when displaying search results: saerch.php or index.php – see Template_Hierarchy.

    Just take the search form from the default theme (it is in a separate file, named searchform.php) and see how it is included in different other files. That’s all.

    Thread Starter jhodgson

    (@jhodgson)

    Yeah that’s what I did. It goes to the main page and shows nothing. No search, no results. Just my normal main page.

    Then you are doing something wrong:
    https://www.jimhodgson.com/index.php?s=grub&submit=Search
    It works, it just has a problem with displaying the results – mainly HTML/CSS issues.

    Thread Starter jhodgson

    (@jhodgson)

    its actually fkco.com that i’m concerned with.

    Thanks for the help, BTW

    I tried the link you just pasted and substituted fkco.com but got the same thing. Main page, no results.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t understand search’ is closed to new replies.