Si vous travaillez sur un site avec beaucoup de contenu dans des taxonomies personnalisées et des types de publication, vous souhaitez que vos utilisateurs/utilisatrices puissent le trouver facilement. Une façon de le faire est de permettre à vos utilisateurs/utilisatrices d’affiner leur recherche. Précédemment, nous vous avons affiché comment créer un formulaire de recherche WordPress avec des options avancées pour choisir le type de publication. Cependant, cela nécessitait d’ajouter du code à votre thème manuellement. Dans cet article, nous allons vous afficher comment ajouter une boîte de recherche avancée dans WordPress en utilisant Facetious.
La première chose que vous devez faire est d’installer et d’activer l’extension Facetious. Dès l’activation, l’extension ajoute un widget de recherche Facetious sous Apparence » Widgets. Faites glisser et déposez le widget Facetious Search dans votre colonne latérale ou dans toute autre zone dotée d’un widget.
L’extension vous permet de choisir les taxonomies et les types de publication à inclure comme champ pour les critères de recherche. Vous pouvez même restreindre la recherche à un type de publication particulier, comme les posts, les pages ou les médias. Facetious utilise également une structure de permalien personnalisée pour la page de résultats de recherche, ce qui permet à l’extension de bien fonctionner avec les plugins de mise en cache comme WP Super Cache et W3 Total Cache.
Tout en permettant aux utilisateurs/utilisatrices de sélectionner des catégories, des identifiants et d’autres options pour restreindre les résultats de la recherche, cette option utilise toujours la fonctionnalité de recherche intégrée de WordPress. La plupart des gens seraient d’accord pour dire que ce n’est pas la meilleure option. C’est pourquoi nous avons écrit comment ajouter la recherche personnalisée de Google dans WordPress.
Nous espérons que cet article vous a aidé à ajouter des options de recherche avancées à votre site WordPress. Pour vos retours et questions, vous pouvez nous trouver sur Twitter et Facebook ou vous pouvez laisser un commentaire ci-dessous.
Syed Balkhi
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
sahil
This plugin is closed now. please update this post.
WPBeginner Support
Thank you for letting us know, we will certainly keep an eye out for alternative options.
Administrateur
Joe
I’m looking to build a smart and detailed product search page – much like ebay, this would let the user pick various categories, filters, sliders, etc. Is there a recommended WP plugin that could do all this using queries on the backend database?
Thanks,
Joe
Steven Denger
Well the WP Google search is not compatible with my version which is 4.4.3 and if Facetious does not give good search results then I am back to square one – no search box. I am now content on not having a search box after the crazy hassle trying to find one. SearchWP wants $49.00 for their plugin. I would not trust purchasing that for the simple reason that the wordpress search widget that came with my site does not function at all and comes about all scrambled. What is it with Wordpress and Search Boxes anyway?
Steven Denger
This forum is most of the time very helpful – but all to often it seems to fall into the category of technical info for the more experienced developers. Experienced developers generally do not need help as they are the ones who can answer questions for the one’s like me.
I cannot believe the technical hassle of trying to put a search box on my site – and exactly where I want it. I have a search widget that comes out all messed up. It displays the box with the name « search » halfway in and half out of the box. Then it says « search » again about an inch below it. All together it takes up and creates a 2 1/2″ space besides not displaying properly. When I try search plugins they are dependant on an existing wordpress search box to be installed to begin with. This is one of very many insanely difficult Wordpress features that takes something one would think to be simple, and make it as impractical and difficult as one could possibly make.
Like a lot of things that I would like to add to my website, I have to do without because all the help forums are explained like one developer to another instead of made simple enough to just install and use.
I see the importance of having a search box on my site because it speeds up the searching for a viewer who does not want to dig around for an hour just to find something. But I have given up the idea of ever having one because like a lot of Wordpress additions, it is designed for developers to use instead of the less experienced like myself. And I am experienced enough now that I add everything on my site with code instead of visual – a big advantage when building content in Wordpress.
WPBeginner Support
We would recommend you to check out SearchWP plugin. It is easy enough for beginners and has many advanced features.
Administrateur
Steven Denger
This forum is most of the time very helpful – but all to often it seems to fall into the category of technical info for the more experienced developers. Experienced developers generally do not need help as they are the ones who can answer questions for the one’s like me.
I cannot believe the technical hassle of trying to put a search box on my site – and exactly where I want it. I have a search widget that comes out all messed up. It displays the box with the name « search » halfway in and half out of the box. Then it says « search » again about an inch below it. All together it takes up and creates a 2 1/2″ space besides not displaying properly. When I try search plugins they are dependant on an existing wordpress search box to be installed to begin with. This is one of very many insanely difficult Wordpress features that takes something one would think to be simple, and make it as impractical and difficult as one could possibly make.
Like a lot of things that I would like to add to my website, I have to do without because all the help forums are explained like one developer to another instead of made simple enough to just install and use.
I see the importance of having a search box on my site because it speeds up the searching for a viewer who does not want to dig around for an hour just to find something. But I have given up the idea of ever having one because like a lot of Wordpress additions, it is designed for developers to use instead of the less experienced like myself. And I am experienced enough now that I add everything on my site with code instead of visual – a big advantage when building content in Wordpress.
I cannot afford a developer to do this so I just give up and have to do without. I have spent enough time on this to build about half of a website.
devi
need suggestion for online digital library box search
nourteddine
thanks a lot i was looking for this plugin long time ago
Krish Murali Eswar
Which is the best option between the four choices:
1. Word press’s native search
2. JetPack’s omni search (I am not sure how it works and if it is indeed a search)
3. Google search for Wordpress
4. Factitious that you wrote there.
Would appreciate your help.
Rich
Awesome tutorial.