I ripped some code outta the WordPress theme K2 (the sequel to the infamous theme Kubrick that comes bundled with WordPress) that allows you to see your search results as you type.
I’ve modified it a bit and my modifications are still a work in progress, but you can check it out in the search box to the right.
(It may take a second or two to display the results as it has to query each time you type, so be patient.)
Very Cool Viperbond007! I too had considered doing just this with my blog, but due to time constraints I didn’t get around to it. How difficult was it for you to “cut and paste” it? Any pitfalls I should watch for?
Oops! Sorry about the mispelling of your name, I got the order confused 😉
Gotta love when your PC locks up after typing out a small essay. <_< I also notice that you've implemented it into your blog already. 😀 However, I'll still re-type out my comment (I wrote it down on paper off my frozen screen, lol) as some of it still applies.
lol, it’s okay, I actually used to go by ViperBond007 like 7 years back. 😉
Anyway, it wasn’t too hard, but it was kinda pain to get it to validate while keeping auto-complete off. It had been using
I ended up naming the search field
sand then the UNIX timestamp for the current time (without seconds as it often takes more than 1 second to generate my blog) as the name of the input field. This makes it basically different each time you load a page (give or take), making auto-complete not work on it.
I then though had to have the form post to a script that’d accept the changing input field name and then redirect to the WordPress search results page in a format that WordPress could understand.
It sounds WAY more complicated than it really was, and I’ll share the code if you want.
It’s still a work in progress though, especially since I didn’t realize that a new version of K2 was out. I also cannot get it to go over the contents of my sidebar. It just keeps pushing the contents down and it’s driving me nuts. lol
Hello there! 🙂
Can I use your live search plugin?
Where can I found it? 🙂
Thx for your time.
Cristian Chelaru on October 2nd, 2006 at 8:03 AM wrote:
It’s not a plugin. As said in the post, I stole the CSS/PHP from the K2 theme.
You might try this plugin though…