View Product Page

Add a search form using a shortcode

Go to YITH > Booking > Configuration > “Search forms” and copy the shortcode related to the search form that you want to show on your page.

copy shortcode search form

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.

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.

add 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

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:

categories to show in search form

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