LiveSearch Update
posted mid-afternoon by Constantinos. Filed under Code, WP Plugin This post was originally published in 2006
The tips and techniques explained may be outdated.
I’ve updated the code to include an option for the size of the search box which I neglected the first time around. I also crudely fixed up the code so that no javascript errors occur when a page without the searchbox is loaded. (For example on my site, any page outside the blog). I’ve done some preliminary testing and it seems to work. If anyone can (or wants to) improve on this, please do so! The archive files on the original post have been updated to reflect the new changes.
The next step would be to fix up the css a little bit. One thing I don’t like on my site is that the first result is not indented properly with the rest… I need to take a look at that. Also, would anyone be interested in moving all the color/size options for the css in the wp-options page? Is this a good/bad idea? This would be done by moving the css outside of the file and into the plugin code, so it gets printed directly in the header rather than linked to. It would make it relatively easier to make simple changes, but much harder to customize the css completely. It’s not that hard to do it, I just don’t know if people would prefer it that way or not. Also worth to note that with an external css file people can customize a different css for each of their themes if they are using multiple ones, whereas with all the color/size options moved into the WP Options page, then all that would have to be changed manually…