Today, we finished coding a new custom search engine for www.MacMakeup.net. We started with some basic infrastructure backend that allows users to properly search through the database tables for a few things. Main problem was that the standard search built into WordPress, wouldn’t touch the custom built tables.
We ran into the issue when the standard WordPress search engine works this way: When you do a search on your blog or WordPress site, your search results are listed in order…chronologically by the date. Not by most popular or most frequent or most probable or most use of a word, it just displays by date. The chronological order goes from newest to the oldest post. If the most likely post to provide the information the user is searching for is older, they will have to scroll towards the end of the list to find the most likely candidate for information. But, the big question is this. While the user scroll all the way down to view those results? Most likley not. They will just look at the top to see if what they are searching for pops up. One thing, that I wish would change with the standard WordPress search is that why doesn’t it search comment or pages? It only searches posts. When a user hits the search button, WordPress will go out and look for the “search.php” file. If it doesn’t find it, it will generate the search on the “index.php” template file.
While we tried to use the built in search engine, it wouldn’t touch the custom tables. Other search didn’t work either, so we decided to “tweak” Sphider for WordPress plugin here to work to my needs. After tweaking it, we decided that we will need How to Time Things in WordPress – Cron Job Plugin. Work flawlessly out of the box.
The site uses 3 custom plugins(php scripts) and some other lists and html tables. The custom plugins utilize many SQL tables.
When we first did market research on adding this custom search engine for the site, we first looked at some options:
- The user should be able to decide what to search (via check boxes, possibly 5-6 boxes).
- We already knew that the search should be able to query all 3 custom(non standard WordPress) tables.
- We already knew that the search should be able to search other HTML tables.
- The search result’s page should display hyperlinks and highlights to the words searched for.
- The links should be able to be clicked through to the corresponding page and display the searched.
- We knew that we wanted to make sure that the search should be a WordPress plugin future proof for upgrades to WordPress.
We decided to take some of those options out (the check boxes), as we didn’t really see the need for them.
After a week of work, the search engine now is a success! You can find it here: www.MacMakeup.net and look into the header, please give it a try!