Describe WordPress Search Functionality
WordPress can search page titiles, page content, image titles and captions, alt text, and file names. It will not search widgets, user comments, categories, or tags. It will simply search for matches. There is no filtering of content. The search is query based so the larger the site, the longer it will take to return the search.
Explain the Role of the URI When Searching
When searching WP will not return a human friendly URL. It will return a string of numbers and percents based on the search. To change this we must allow Apache to do a mod rewrite of the URL to return a human friendly version of the search. This is done by changing wordpress settings to permakinks. This will rewrite the URL to display the words being searched separated by a +. For example if I searched "free cms". The URL would display as "search/free+cms".
Explain How to Show the Current/Active Search term in the Search Form
To get the current search to display in the search form, one needs to run a query for the value= that states if a search is done, echo the query. Else echo search. The code is like this: if( is_search() ){ echo get_search_query(); } else { _e('Search'); } ?>" This will display the words being searched in the search form on the results page.
Summary
WordPress has an inherent search function. It is limited in the the areas that it can search and the results are not filtered. This can cause a lagging effect for large sites. Many developers choose to enhance the features using plugins. The URL of search can be unfriendly to the end user, so allowing for mod rewrite to create a more user friendly URL that includes the search terms is another best practice. Search forms can also be set to display the search teerms on the results page to aid the user in understanding the search that has been returned.