View Product Page

Add a search form using a shortcode

If you go to YITH > Booking > Configuration > “Search forms” you can directly copy the shortcode related to the search form that you want to show on your page. For example: [booking_search_form id=1]

Search form shortcodes

If you want to set the search form only for bookable products of a specific category, you have to use the attribute cat=current in the shortcode. For example: [booking_search_form id=1 cat=current]

In this case, please, keep in mind that you would have to add the shortcode in the respective category page.

You can insert the shortcode of your choice in the Gutenberg blocks, on the page you want, wherever you want.

Insert shortcode into block

The frontend will show the form as you have set it up in the search form settings.

example frontend search form shortcode

Within the form-creation page, you are able to manage the colors of the form.

Add a search form in a widget

Any of the search forms created can be added to your theme sidebar or topbar sidebar, using the “Booking search form” widget.

Search form widget

Search form widget

For this example, we have created 2 different search forms, one to be used vertically and one to be used horizontally.

Example of horizontal search form

horizontal search form example

Example of vertical search form

vertical search form example

 

Search form categories

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:

Booking categories
  • 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.