1. Home
  2. Docs
  3. Availability Search for WooCommerce Bookings
  4. Availability Search Shortcode

Availability Search Shortcode

Important! Shortcode documentation is currently in progress for the 1.6 beta version which is only being tested by selected beta users. The parameters will only work for 1.6+

Prior versions all use the [availability-search]shortcode. We recommend switching to [availability_search] for 1.6 +.

Check the current available version. Reach out to support if you’d like to test the latest development version.

Shortcode Parameters overview

Any of the parameters in the shortcode will be prioritised over the default settings.

Display the search[availability_search]
Select a date range[availability_search datepicker="range"]
Select a single date[availability_search datepicker="single"]
Allow customers to select categories[availability_search category_dropdown="true"]
Limit Search to one category[availability_search category_include="your-category-slug"]
Limit Search to multiple categories (seperate with commas)[availability_search category_include="category-slug-one, category-2"]
Sub Categories in the dropdown[availability_search category_include="parent-slug" category_subcategory="true" ]
Put it all together[availability_search datepicker="range" category_dropdown="true" category_include="category-slug-one, category-2"]

Display a category dropdown

You can specify the category_dropdown parameters to be true. This will enable a dropdown selector that includes all of your product categories.

You can use the category dropdown together with the category_include parameter.

[availability_search category_dropdown="true"]

Limit Search by categories

This will only include the specific categories. Any product that’s not in the category will not show up in the search results.

Screenshot of the WooCommerce category slug setting

You’ll need your category slugs, which you can find under the WooCommerce product categories settings. Comma seperate the categories to include multiple categories.

[availability_search category_include="boat-tour, bus-tour"]

Category dropdown with specific categories

Limit the dropdown options by adding the category_include parameter with the slugs of your specific categories. You can find the slug under the WooCommerce product category settings.

You can also add multiple categories by using a comma separator.

[availability_search category_dropdown="true" category_include="accessories, bus-tour"]

Sub Categories in the dropdown

[availability_search category_dropdown="true" category_include="parent, child" category_subcategory="true"]

You can mix parent categories and subcategories slugs inside the category_include include tag.

When category_subcategory="true" the category dropdown will display all subcategories of any parents categories.

Was this article helpful to you? Yes No