I am trying to create a custom search similar to the one on totaljobs.com but through a WordPress site. Essentially I would be able to search for both search terms and location simultaneously.
The way it’s working now is that there is a search term field and then there is also a location search. They are two separate fields. For the search term field, I’m using the standard WordPress search and for the location search I am taking the jobs latitude and longitude and a radius setting and running them through the Google Maps API. As you can see, the search process is quite different on both searches.
I’ve added custom fields to the posts for latitude and longitude and am querying them in the database for my search. What I don’t know is how the standard WordPress search works. Is it looking in the post_content and post_title field, etc.? I can’t seem to find the server side code to investigate it because the search.php is more of a generic loop code.
I’ve found that $s is the global variable for search term but I can’t find where that variable is being processed and am interested in how the database uses that variable because I think I’ll need to build around the current WordPress search info.
I appreciate the help. Thanks!