Go to YITH > Booking > Configuration > “Search forms” and copy the shortcode related to the search form that you want to show on your page.
You can set the default category in the search form using the shortcode:
[booking_search_form id=1 cat=current] you can use this particular shortcode in a category page, for example, to allow searching only for bookable products in that category.
You can insert the shortcode of your choice in the Gutenberg blocks, on the page you want, wherever you want.
The frontend will show the form as you have set it up in the search form settings.
Within the form-creation page, you are able to manage the colors of the form.
Any of the search forms created can be added to your theme sidebar or topbar sidebar, using the “Booking search form” widget.
For this example, we have created 2 different search form, one to be used vertically and one to be used horizontally.
Example of horizontal search form
Example of vertical search form
If you enable the “Categories” field in the search form, you can give your users the possibility to filter search results based on the selected category.
From YITH > Booking > Settings > You can set which categories to show in search forms:
- All product categories: Useful if you do not sell non-booking products.
- Choose specific product categories: Useful if you also sell non-booking products. Eg. you do not want to show the clothing category in the booking search form.