Grow your CSS skills. Land your dream job.

wordpress search help

  • # March 5, 2012 at 10:27 am

    On my wordpress theme i am using a static page for my home page. The issue is if someone submits an empty search wordpress sends them to the index.php. I remember that in one of the videos Chris showed a technique to deal with this but i can’t remember which video it was. Does anyone know how to deal with this or which video it was?

    Cheers
    Phil

    # March 5, 2012 at 3:24 pm

    Does anyone have any idea? Please

    # March 5, 2012 at 3:56 pm

    It sounds to me like maybe the search.php is either missing or has some kind of exception in it. Like everything else it’s just another loop of some kind. I generally doctor up my search file as I really don’t like how the default page displays info. But I’d first check those two items to rule them out.

    # March 5, 2012 at 6:58 pm

    @JoshWhite The search loop is fine and on a standard WP site that don’t use a static home page don’t have an issue with when someone submits an empty search but as soon as you use a static home page the issue arises. This is because the WP standard for handerling an empty search is to send the user to index.php. This is the issue i am battling with and need to fix.

    # March 10, 2012 at 4:46 pm

    I’ve still not been able to find the answer to this yet can anyone help please

    # March 12, 2012 at 1:25 am

    Sorry, do you have the search.php file? Can’t tell if you’ve answered Josh’s question.

    # April 10, 2012 at 2:03 pm

    @TheDoc Yeah i have a search.php file but the default for wordpress when someone submit’s the search box with nothing in it is to send them to index.php but it wont load the page that you have set as your home page which in my case is a template under home.php

    # April 10, 2012 at 2:08 pm

    Aaahhhh. There are a few solutions for this. Just search “empty search wordpress” in Google and you’ll find a plethora of solutions.

    # April 10, 2012 at 2:11 pm

    @TheDoc

    Thank you

    # April 10, 2012 at 2:17 pm

    Yeah, I remember having this issue. I might have posted it here in the forums.

    Edit: It was unrelated to an empty search.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".