5R - WordPress Search

Wordpress Search Functionality

Wordpress search works as a smaller scaled search engine, included in WordPress core by default. From starting as a basic search tool to return results that the user enters, now being much more large search engine that has evolved over numerous years. At one point only being able to return results that contained specific search terms, are now has a better job of understanding what users are looking for, returning content based on their relevance.

Role of URI when searching

The Uniform Resource Identifier (URI) is a string of characters that is used to identify a web resource, included as a name, a location, or even both. URI's happen to consist of two types - first being Uniform Resource Locators (URLs) which are able to specify a resources location. Then we have Uniform Resource Names (URNs) which is for naming a resource without its location.

Current / Active search term in search form field.

The get_search_query function will retrieve the search query string from the form or URL. This comes in handy for displaying the query or the search results page or a customization. By using this function, developers can access the search query with ease, then use it to enhance the functionality of their WordPress site.

Summary

Overall, adding search to your website is very beneficial not just to your visitor, but to the developer as well for being able to obtain the traffic of the site and data to retrieve. Search query are basically the user writing down what they need exactly.