AutoSuggest Searches for WordPress Released

wp-autosuggestWP AutoSuggest is a new plugin for WordPress that I released today. I needed the ability to quickly find posts when I search on my blog by typing in a keyword rather than waiting for the results page to load.

This plugin was inspired by Google’s AutoSuggest feature which was initially created by Yahoo. Also, Facebook has been using this technique frequently which helps load data faster and of course consumes less bandwidth on both the client and the server’s ends.

Installing this plugin is very straight forward:

  1. Download it from the WordPress plugins repository
  2. Upload the directory wp-autosuggest to your WordPress plugins directory (/wp-content/plugins/).
  3. Activate the plugins from the Plugins section in your WP Admin area.

Note: For some templates, the designers have changed the Input ID of the search (I did that), so you can change the ID of your search box from the Settings > WP Autosuggest (It’s s by default).

There are a lot of customizations and options I’m considering, like Color Themes, Display etc… If you are familiar with the WordPress Codex and feel like contributing to this plugin, contact me!

WP AutoSuggest page has been created for you to follow the updates which will be followed by a detailed blog post.

If you have some suggestions, please write a comment.

Stay tuned.

  • Johny

    Looks great dude as usual :)

  • http://morsom.no Fredelig

    Good job, Elie! :)

  • http://www.lessnau.com/2008/12/posts-about-wordpress-plugins-as-of-december-14-2008/ Posts about WordPress Plugins as of December 14, 2008 | The Lessnau Lounge

    [...] to participating in blog carnivals: * They improve your authority * You quickly get profitable, AutoSuggest Searches for WordPress Released – ekhoury.com 12/14/2008 wp-autosuggest WP AutoSuggest is a new plugin for WordPress that I [...]

  • http://www.404techsupport.com Jason

    Looks great, but it doesn’t seem to work for my site.
    http://www.404techsupport.com

    I installed the plug-in using the WP 2.7 plugin installer (versus the traditional copy to the site) and activated it. Is there anything else I need to do?

    I have Andreas09 theme, but the input is still named $s.

    Thanks!

  • http://www.404techsupport.com Jason

    I take that back. It works great in IE, just not in Firefox. But it works on your site in Firefox…

    Hmm…

  • http://www.ekhoury.com Elie

    @Jason:

    I checked your website. Your input ID is “searchbox” not “s”. Good luck.

  • http://www.404techsupport.com Jason

    Thanks so much. I changed it to ‘searchbox’ in the settings and now it’s working. Sorry for my mistake.

    This plug-in looks great!

  • http://kugames.ru kazimirr

    Hi!
    Installed your plugin. Yeah, it’s very good idea, but all my posts are beginning with pictures and when I’m typing something in searchbox html-code of pictures is appearing. Cn’t you fix this problem and add option to show only text. And various max length of anounsces would be good. Or option like “Only titles”.
    Thanx for plugin. I’m waiting for new versions.

  • http://www.razvan-antonescu.info Razvan Antonescu

    Elie, here are some suggestions for a next release:
    1. Include tags/categories along with regular results. That implies that you have to show them above regular results in a different format
    2. Let the user set the number of results (first X results). This is very usefull as in one of my sites, the most popular query returns a large set of results.
    3. Let the users choose if they want only titles

    Otherwise a great plugin and very expected i guess :) I’m waiting for 0.2 :P

  • http://www.mypharma-editions.com Betman

    Hello; great plugins !! But it doesn’t work on my site. input id is on “s” ?

    There is a probleme with template ?

  • http://www.ekhoury.com Elie

    This plugin works only with templates that have wp_footer(); added before the closing body tag because it injects a Javascript code in the footer.

    So make sure your footer.php template file contains < ?php wp_footer(); ?> before the closing body tag.

  • http://www.powergamer.se Daniel.G

    Really nice script, it works really well in Firefox but not at all in Internet Explorer 7.0 ? Checked the ID and it’s correct, also checked so that the right code is before the closing tag in the footer.php file.

  • http://www.razvan-antonescu.info Razvan Antonescu

    Works for me in IE7. Check http://video.metalz.info

  • http://www.connect.facebook.com/profile.php?id=562360446 Derek

    Awesome plugin :D we’ll install it on iLabz for sure !

  • http://www.connect.facebook.com/profile.php?id=560495103 Elio Massih

    Simpler yet AMAZING !!! 100 % elie khoury

  • http://www.milton.fr/wordpress/ Touwal

    Ho….I’m so sad…It doesn’t work.
    Template : Interphase
    No

    Thank’s

    Touwal

  • http://www.socialnetworking.com David B

    I’m interested to see if this can be adapted for use within BuddyPress, the beta of which was just released.

  • http://weblogtoolscollection.com/archives/2008/12/18/wordpress-plugin-releases-for-1218/ WordPress Plugin Releases for 12/18 | Weblog Tools Collection

    [...] WP AutoSuggest [...]

  • http://www.wordpress-blog.nl/2008/12/18/wordpress-plugin-releases-for-1218/ WordPress Plugin Releases for 12/18 | Wordpress Blog NL

    [...] WP AutoSuggest [...]

  • http://www.naghies.ir/1387/09/28/new-plugins-5/ Naghies » Blog Archive » ?????? ??? ????

    [...] WP AutoSuggest [...]

  • http://www.vulvodynia.pl/ V

    Hi,

    Thank you for the plugin.

    I’ve got two requests if that is possible. To make the width of the ajax window variable (ie to be possible to make it wider then the search box/form).

    The other is UTF character coding for non-western languages… the majority of the web I guess…

  • http://www.configuracionvisual.com/ dlv

    perhaps the best plugin of the month!
    i was searching something like this…i’ve tried some other hand writting technics but nothing worked… so finally your plugin make job. Thanks for share it !
    tomorrow i’ll try it…now, i’m gonna play football :)

  • http://www.newsfilter.gr asynadak

    This is an awesome plugin! Great work there!

    So, i can suggest only two things:

    1. Support UTF characters for non-western languages (as V suggested a couple of comments before), as my website is in Greek!
    2. My blog has almost 2000 posts, so it takes a lot of seconds before you start seeing results. Is it possible to speed this up?

    Thank you a lot once again. I am really looking forward for the next versions!

  • http://www.configuracionvisual.com/ dlv

    Elie, just a simple question… how can i remove excerpt, showing only titles as results ?

  • http://es.weblogtoolscollection.com/archives/2008/12/19/novedades-plugins-de-wordpress-1812/ WeblogToolsCollection Español » Archivo del Blog » Novedades Plugins de WordPress 18/12

    [...] WP AutoSuggest [...]

  • http://www.reapmoneyonline.com Bong

    Great plugin. I’ll replace the search for all our blogs with this one. Thanks.

  • http://www.ekhoury.com Elie

    @dlv: I’ll add this feature in the next release

  • http://vansantos.com/2008/12/21/3-interesting-new-wordpress-plugins/ 3 interesting new Wordpress Plugins | Van Santos

    [...] AutoSuggest Searches [...]

  • http://www.nehemoth.com Nehemoth

    Really nice plugin, but I have some suggestions

    #1 First Speed up, take like 10 seconds to show some results
    #2 Its only looks in the Title, should search in the Body, The Tags, The Categories.
    #3 The Wide size should be regulated
    #4 should have support for non english characters
    #5 Did I mention Speed?

    Anyway I hope a new version soon, this is the 0.1 version, ufff there’s a lot of potencial here.

    Love it

  • http://www.configuracionvisual.com/ dlv

    ok, thanks Elie
    I agree with some Nehemoth’s point… good luck for the new release, thanks for work on it!

  • http://www.ziapour.com Payam Moin Afshari

    I have a Farsi (Persian) website (http://ziapour.com). For me, it didn’t work in Firefox at all, and in IE, it is not finding anything and just shows my Not Found message. Also changing the typing language from Farsi to English and vice versa, cause a Java Script error, so I have to deactivate it again :(

  • http://coghillcartooning.com George Coghill

    Great plugin! I have one small issue — it’s not respecting the limit I set to the number of results — they just keep on going, extending the page to fit!

    Using on WP 2.7 and the K2 theme.

  • http://www.ekhoury.com Elie

    George, this will be fixed in the next version.

  • http://www.klikwae.info/weblog-tools-collection-wordpress-plugin-releases-for-1218.htm Weblog Tools Collection: WordPress Plugin Releases for 12/18 » KLIK WAE DOT INFO

    [...] WP AutoSuggest [...]

  • http://coghillcartooning.com George Coghill

    Elie — Great to hear! Thank you.

  • http://www.wpsos.com/wp-plugins/wordpress-plugin-releases-for-1218/ WordPress Plugin Releases for 12/18 | Wordpress SOS

    [...] WP AutoSuggest [...]

  • http://kugames.ru kazimirr

    Waiting for update

  • http://www.nehemoth.com Nehemoth

    \waiting for update here too.

  • David

    Using 2.7 with “s” as search ID.
    Can’t get it working here, as well.

    It’s always showing me 10 results,
    no matter if they match or not.

    if they match it marks the right part/word in the title,
    if it doesnt match it marks the first letters of the title
    (as many letters marked as the search term has).

    Can we hope for a fix anytime soon, Elie?

    Hold up the good work! Appreciate it alot!

  • Lucas

    Hi at all,
    I’m using this plugin with WordPress 2.7.
    It works with Internet Explorer but not with Firefox. :( :( :(

    Is it normal? :(

  • http://www.nehemoth.com Nehemoth

    No Lucas, Is not normal, It should work.

  • Lucas

    Hi Nehemoth,
    First of all, thank you for your replay.

    I’m using 0.1 version of WP AutoSuggest plugin. It works fine under IE but non with Firefox.

    I’ve tried with Firefox under Windows (vers. 2.0.0.2) and Iceweasel under Debian (vers. 3.0.5-1).

    Can you help me? Have you idea what is the cause of this problem? :(

    Thank you!!

  • http://www.nonsoloblog.com Phoenix1977

    Hello,

    very cool plugin, can you help me for my website?
    I have the following error:

    Ajax error: 500

    I insert as ID searchbox and s too but doesn’t work.

    I’m using wordpress 2.7.

    Thank you very much in advanced.

    Regards

  • http://www.lukeaddison.com/blog 1uk3

    Same issue as other here – it doesn’t seem to work under Firefox, Chrome or Opera. I’ve tried a few thing’s but no joy yet. Works fine in IE7

  • http://www.ekhoury.com Elie

    @1uk3

    Make sure you change your Search ID to “qsearch”. Most probably, you have left it “s” which is the NAME not the ID of the Search input field.

  • http://www.lukeaddison.com/blog 1uk3

    @Elie – you’re a star! All working now. Just me being dumb!

  • http://binaries.ru/ brainsolid

    Hi!
    Great plugin, but it show something like Ð and so on, becouse i have russian blog and UTF-8 encoding. Maybe you can fix it?

  • Martin

    Great plugin but it contain too many bugs, (support for non english characters etc). When are you planning the next version? Looking forward to it!!

  • http://underdevelopment Jake

    Hi. WP-Autosuggest is great! I was doing something like this to my theme, but even better – external plugin that works automaticly just kicks ass..!!

    Anyway, there’s just something that I wanted to say:
    1) .gif files for round corners of the speech bubble.. Well, they don’t equip transparency – so they look great on white – and only on white background :/

    2) I use this plugin on my site, http://poplarware.com/languageplugin.html ; It is a plugin to make your site a multi-lingual experience, it will translate (if properly configured and plugins and theme(s) support gettext/localization) your whole site to another language(s) – ofcourse, posts you will have to manually write with as many languages as you want them to be published as.. Anyway, rather than using a static no results text, you could implement a translation for your plugin – maybe you want to add this option either way and use preset from translation file if this settings is empty..

    3) About translation again.. When I write multi-lingual posts, I use tags like lang_en lang_fi lang_all and your plugin just don’t go this way.. I mean, when I see headers from my posts, I see these tags and I see all the avail translations (if they fit to the preview) while my translation plugin should select what it outputs according to my translation setting..

    Great work..

  • http://underdevelopment Jake

    Maybe you could add a setting to turn of post previews in wp-autosuggest, this way; people having problems with it – could just turn it off and use instead only a list of titles in wp-autosuggest..?

  • http://underdevelopment Jake

    I almost forgot, here’s a link to a good site explaining about wordpress localization support..

    http://blog-en.icanlocalize.com/installing-wordpress-for-multiple-language-blogs/how-to-localize-wordpress-themes-and-plugins-with-gettext/

  • http://www.chiefs.at Chiefs Hockey

    using yr plugin w 769 posts, works like a charm! Recommend it as one of t most valuable plugins for WP! Thank u – chris

  • http://minhlamdr.net Minh Lâm

    First I installed the plugin, it did not work. Then I found that the search box of my theme did not have ID. :D
    I added an ID ==> It work. Thank you so much.

  • Vaclav Vancura

    Hi. Your plugin is great, but doesn’t validate. There’s an easy fix: just find ‘&’ and replace with ‘&’. Cheers!

  • http://roadrunner.cx Jake

    I updated plugin again. 0.23 has been released – it’s a minor change to javascript but it makes enter to work as submit button in any browser(which has js support and js enabled) – this way people are not required to have a submit button in their search forms.. But if you wish, you still can add a submit button – either way; wp-autosuggest 0.23 – helping people to make nicer themes now as well..

  • http://roadrunner.cx Jake

    Vaclav Vancura; could you please be more specific? you propably mean using & amp but I still don’t follow you – and I didn’t find this problem with w3c validator.. (I used this page on validator)

  • http://RedFox redfox

    nice plugin.
    but i have some questions.
    1) how to change colors of suggested bobble ?
    2) is there any cached queries to speed up search ?
    3) can it be combined with opensearch (where your browser search provider gives suggestions) ?

  • http://roadrunner.cx Jake

    1) change plugins css file under folder css – or just check them out and change values defined in your theme instead.

    2) It’s super fast, so no :)

    3) No.

  • http://www.berlotto.blog.br Sérgio Berlotto

    Great plugin, but it dosn´t work on my site…
    any ideia ?
    latest WordPress release…

  • http://universalwebdirectory.com Rakesh

    Very nice plugin…

    I have done bit of changes. I wanted to just appear the title so i removed the get_the_content() and also the [...] from excerpt. Hope you don’t mind.

    Just one question i have, how do i add filter to it. I want to search only categories not pages…. Please Help………!!!

  • http://linuxbsdos.com finid

    Great plugin. It would be nice to have an option to disable showing excerpts in the results.

    Thanks

  • http://davidswain.co.uk david swain

    Is there any way i can get the search result to appear above the search box? I have the search in the footer and would like the serch results to ‘grow’ from the top of the box.

    Thanks

    David

  • http://www.votuananh.net ta

    I can’t use your plugin. Not work for my theme :(

  • http://foyerclothing.com Zane

    Is it possible to have image thumbnails in the search results, I use the

    to call a thumbnail. But I may change it with wordpress 2.9 to use the new function. If it had a little thumbnail for the post that would be on point

    Thanks

  • http://foyerclothing.com Zane

    php the_post_thumbnail

    it stripped my code

  • http://www.octane.uk.net/ Wayne Smallman

    So far, the Plugin doesn’t work at all. I’m running WordPress 2.9.1

    The only place I do get anything is an AJAX error on the search results page itself (type 0).

    Also, the CSS styling is breaking my design; why would you want to alter the body tag style?

  • http://tower200review.org tower 200

    I have been using it for years and wouldnt use anything else!

  • http://www.princessdesign.net/wp/2010/04/20/wordpress-wp-autosuggest-search-and-qtranslate-plugins-working-together/ Princess Design » Blog Archive » Wordpress: wp-autosuggest search and qTranslate plugins working together

    [...] Autosuggest searches for WordPress Share: [...]

  • http://www.princessdesign.net Princessdesign

    Here is a post on how to make qTranslate and wp_autosuggest work together WordPress WP_autosuggest and qTranslate. In case you need it ;)

  • http://www.markzonder.com/ Amy

    I have been using it for years and wouldnt use anything else!

  • http://www.lupleo.com Cristian

    Hello,
    I really want to use AutoSuggest Searches for WordPress on my site to search on WPDirectory Pro with Glossy Stylo Theme. How can I configure it?
    Thanks in advance!

  • Thesanerone

    great plugin! Found a bug in your code that trows an error in IE…Here’s the fix:

    Replace this ‘ var form = (ev.target) ? ev.target.form : ev.srcElement.form;’

    with this ‘
    var form;

    if (!ev) var ev = window.event;

    if (ev.target) form = ev.target.form;

    else if (ev.srcElement) form = ev.srcElement.form;

    if (form.nodeType == 3) // defeat Safari bug

    form = form.parentNode.form;’

    This covers all browsers!! Wa-La!!

  • Dave

    I have just been trying wp-autosuggest out in WP3.3.1 and have found that while it is active, it is affecting what I can do in the WordPress Settings / Widgets. I am unable to move or open up the widgets to change parameters. Is this a known problem?

blog comments powered by Disqus