# Rates table

You will use the rates table shortcode or bloc to display a pricing table. There are various options for the organization of the rates as well as the type of rates to display.

<a id="shortcode-hb_rates"></a>

## Shortcode \[hb\_rates\]

Use the **\[hb\_rates\]** shortcode to display a rates table.

**Default behavior:**

- Within an accommodation type page, be it an HBook **Accommodation Type** or on the page set as [Display option](../../hbook-documentation/accommodation-types.md#display-options), the rates table displayed is by default the one for this accommodation type.

**Parameters:**

- **accom\_id:** add the accom\_id parameter if you want to display the calendar outside an Accommodation page.  
For example: **\[hb\_rates accom\_id="5"\]**

> [!INFO]
> You will find the accommodation ID in the accommodation type post right under the title.

- **type:** you can choose to display only one type of rate with the **type** parameter.  
Default : normal.  
There are 3 possible values:
  - **normal** : it corresponds to the **Accommodation rate** (for the normal occupancy) as set in HBook > Rates.
  - **adult** : it corresponds to the **Price per adult** **above the normal occupancy.**
  - **child** : it corresponds to the **Price per adult** **above the normal occupancy.**

For example, the following shortcode **\[hb\_rates type="child"\]** will only display the rate per extra child.

- **seasons:** use this parameter to display a rates table for **one or several seasons** only.  
For example, the following shortcode **\[hb\_rates seasons="low,middle"\]** will display the rates only for low and middle seasons.
- **rule:** use this parameter to display a rates table for one “Special rate” booking **rule** only.
- **days:** use this parameter to display a rates table for a **set of days** only.  
For example **\[hb\_rates days="4,5"\]** will display the rate for the Friday night and the Saturday night only.
- **show\_global\_price:** Default: no. Set this parameter to **yes** to show **global prices** instead of a price per night.  
For example, if you have a weekly rate, you might prefer to display the rate for 7 nights than the nightly rate.
- **custom\_text\_after\_amount:** thanks to this parameter, you can display a **custom text after the price**.
- **show\_season\_name:** Default : yes. Set this parameter to **no** if you do not wish to display a column that will show the **name of the season**. You can customize and translate the name of your seasons (if you have a multi-language site) in **HBook > Text > Rate table.**
- **chronological:** Default : no. Set this parameter to **yes** to order the seasons in chronological order in the rate table.

Examples:

> [!NOTE]
> **\[hb\_rates show\_global\_price="yes" custom\_text\_after\_amount="per week"\]** will display a global price with “per week” appended after the rate amount.

> [!NOTE]
> **\[hb\_rates season="high" rule="midweek"\]** will display a table rate for “High” season and “Midweek” special rate rule only.

> [!NOTE]
> **\[hb\_rates show\_season\_name="no" chronological="yes"\]** will display a table rate for all my seasons for the accommodation base rate. The table will order the season by chronological order, and it will not show the name of the season.

* * *

<a id="rates-table-block-gutenberg"></a>

## Rates table block - Gutenberg

![rates-gutenberg.png](./attachments/rates-gutenberg.png)

1. Select for which **accommodation type** the availability calendar is.
2. Select for which **rate type** you wish to display : the accommodation rate, the extra adults or extra children rates.
3. Select how the rates should be sorted: chronologically or grouped by seasons. This setting is important only if you have seasons that have different periods.