requête de recherche costum wordpress pour rechercher dans les types de publication costum par posta meta valeurs

Publié par Jean-Michel le

I am creating a travel theme in which I have created some custom posts like Cities, Locations, Destinations and Hotels and to add further information to those custom posts I have created few meta boxes with some meta keys like Address, rent, rooms for hotel and How to reach for cities, Destination, and Location now I am having a search form on the index page to search for hotel based on the custom meta keys for hotel custom posts for which I have to create my own custom search function in function.php and by seeing the wordpress tutorials to create custom search form I can only have single GET variable « ?s= » which display the result in search.php only if it contain some string so is it possible to customise search form in such a way that wee can pass more then one search variable and still can display result on search.php template.I have search every ware and tried different plugins but the only functionality most of them provide to extend the search area of search query which by default searches only in post content and post title and changing it to search in the tags, category and custom post type

Solution n°1 trouvée

Je pense que ce dont vous avez besoin est expliqué ici : Amélioration des champs personnalisés WordPress avec le filtrage de recherche

Catégories : Wordpress

Jean-Michel

Jean-Michel est en charge de la partie blog du site. Il met en place la stratégie de contenu et répond aux questions fréquentes sur Wordpress.

0 commentaire

Laisser un commentaire

Avatar placeholder

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *