• Resolved aerlaut

    (@aerlaut)


    Hi,

    I’m new to wordpress, and I’m trying to develop my own theme. I’m currently working over the theme’s ‘search’ functionality.

    I try to find out how search works, but there’s no clear documentation for it. All I understand until now is that when we submit a search query, it is passed using GET to the variable s (which shows up in the URL). search.php is then called and used to format the search result.

    When I looked inside search.php, there is nothing special there, only the usual loop and markup to style the search result.

    Hence, how does WordPress get the search query and output it as saerch result? (I suspect something to do with the loop… getting value of $_GET[‘s’] maybe?)

    Thanks for your reply,
    Agi

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How search works’ is closed to new replies.