SR

Custom fields

What are custom fields?

Custom fields are additional attributes you can add to products and accommodation/services (bookables). They let you show extra information, organise content more professionally and allow visitors to filter items by attribute.

Examples for products

  • Brand (Samsung, Bosch, Apple…)
  • Material (Cotton, Polyester, Silk…)
  • Colour (Black, White, Blue…)
  • Size (S, M, L, XL…)
  • Capacity (4 kg, 6 kg, 9 kg…)

Examples for bookables

  • Sea view (Yes, No)
  • Room type (Single, Double, Apartment)
  • Number of rooms (1, 2, 3, 4+)
  • Wi-Fi (Yes, No)
  • Parking (Free, Paid, None)
  • Bed (Double, Two singles, King size)

Supported post types

Custom fields can be created for two post types:

Post type Where it is used Where the filter appears
Products Product pages in the online shop Filter sidebar on the product list page
Bookables Accommodation / service pages Filter sidebar or horizontal bar on the Booking Search component

Important: Fields created for "Products" will not appear on bookable pages and vice versa. Each post type has its own separate fields.


Field types

Type Description Example Suitable for filtering?
Text Free text Material description Limited*
Number A numeric value Weight: 2.5 Limited*
Select A dropdown with options Brand: Samsung, Bosch Yes ✅
Radio Radio buttons Size: S, M, L Yes ✅
Long text (paragraph) Several lines of text per product Origin story, care instructions No

Recommendation: For filtering use the Select or Radio type, because they have predefined options that automatically appear as filter options.

Long text is always a fixed value you write per product (it cannot be a customer's choice and cannot be filtered). On the product page it is shown as a paragraph, with line breaks preserved — handy for text that differs per product and is too long for one line.

* Text and Number fields show only values actually assigned to items — you must fill in the values on the pages first for them to appear as filter options.


Field groups

Every field has an optional Group field (e.g. Size and fit, Material and care). Fields with the same group name are shown together, in one collapsible section on the product page — instead of one long list of attributes, the visitor sees a few headings and opens the one they are interested in. Fields without a group stay in the default Product details section, shown in the site's language.

As you type a group name, the editor suggests groups that already exist — use the same names for fields that belong together. The group name can also be translated per site language.

Display modes

Every custom field has a display mode that determines where and how it is used:

Fixed

  • In the editor: The field IS shown in the "Custom Attributes" section — the admin sets the value
  • On the site: The value is shown as text (the visitor cannot change it)
  • Used for: Fixed attributes (brand, material, room type, sea view…)
  • Filterable: Yes ✅

Selectable (default)

  • In the editor: The field is NOT shown in the "Custom Attributes" section
  • On the site: Shown as an interactive input — the visitor picks the value
  • Used for: Attributes that vary per purchase (clothing size, packaging…)
  • Filterable: No

Which mode when?

  • If the attribute is the same for every purchase of that product (e.g. the brand is always "Bosch") → use Fixed
  • If the customer chooses the value when buying (e.g. size S/M/L) → use Selectable

How to create a custom field

Step 1: Open Custom Fields

Go to Admin → Custom Fields (/admin/custom-fields)

Step 2: Fill in the field data

Field Description Example (product) Example (bookable)
Label The displayed name "Brand" "Room type"
Field Name System name (auto-generated) "brand" "room-type"
Post Type The post type "Products" "Bookables"
Field Type The input type Select Radio
Options Options (for Select/Radio) "Samsung, Bosch, LG" "Single, Double, Apartment"
Display Mode Display mode Fixed Fixed

Step 3: Set the display mode

  • Choose "Fixed" if you want the admin to set the value and enable filtering
  • Choose "Selectable" if the visitor picks the value when buying

Step 4: Enable filtering (optional)

  • Tick "Enable filtering" ✅
  • This lets visitors filter items by this field
  • Note: Filtering is available only for Fixed fields

Step 5: Enable visibility on the site

  • Tick "Visible on Frontend" ✅
  • This ensures the field is shown on the public part of the site

Step 6: Restrict to categories (optional)

  • Choose the categories this field applies to
  • If you choose no category, the field applies to all items of that type

Example: The "Capacity" field applies only to the "Washing machines" category, while "Brand" applies to all product categories.


Custom fields for products

Setting values

  1. Open the product for editing in the admin panel
  2. Find the Custom Attributes section (shown below the other fields)
  3. Choose or enter values for every Fixed field
  4. Save the product

The "Custom Attributes" section shows only Fixed fields that match the product's category. If you do not see a field, check that the product's category matches the field's category.

Example — washing machine

For the product "Bosch Series 6":

  • Brand: Bosch (select — Fixed)
  • Capacity: 9 kg (radio — Fixed)
  • Energy class: A+++ (text — Fixed)

Product filtering

When custom fields are created in Fixed mode with filtering enabled, they automatically appear in the filter sidebar on the product list page:

┌─────────────────────┐  ┌──────────────────────────────┐
│ Filter Products      │  │ Showing 6 of 24 products     │
│                      │  │                              │
│ CATEGORIES           │  │ ┌──────┐ ┌──────┐ ┌──────┐  │
│ ☑ Electronics        │  │ │      │ │      │ │      │  │
│ ○ Clothing           │  │ │ Bosch│ │ LG   │ │Bosch │  │
│ ○ Footwear           │  │ │ 9kg  │ │ 8kg  │ │ 7kg  │  │
│                      │  │ └──────┘ └──────┘ └──────┘  │
│ BRAND                │  │                              │
│ ☑ Bosch              │  │ ┌──────┐ ┌──────┐ ┌──────┐  │
│ ○ Samsung            │  │ │      │ │      │ │      │  │
│ ○ LG                 │  │ │ Bosch│ │Bosch │ │ LG   │  │
│                      │  │ │ 6kg  │ │ 9kg  │ │ 7kg  │  │
│ CAPACITY             │  │ └──────┘ └──────┘ └──────┘  │
│ ○ 7kg                │  │                              │
│ ○ 8kg                │  └──────────────────────────────┘
│ ☑ 9kg                │
└─────────────────────┘

URL parameters (products)

Filters are reflected in the URL:

/products?category=electronics&brand=Bosch&capacity=9kg

Custom fields for bookables

Setting values

  1. Open the bookable for editing in the admin panel
  2. Find the Custom Attributes section
  3. Choose or enter values for every Fixed field
  4. Save the page

Example — hotel room

For the bookable "Room 404":

  • Room type: Double (radio — Fixed)
  • Sea view: Yes (select — Fixed)
  • Wi-Fi: Yes (select — Fixed)
  • Number of rooms: 2 (number — Fixed)

Choosing the filter layout

Unlike products, which have an automatic filter sidebar, filters for bookables are chosen in the page editor where the Booking Search component sits:

  1. Open the page with the Booking Search component
  2. In the editor find the Filter Layout section
  3. Choose one of three modes:
Layout Description Recommendation
No Filters No filters — only search by date, guests, keywords When you have no custom fields or do not need filtering
Sidebar A filter sidebar to the left of the results When you have 3+ filters — clearer, always visible
Horizontal A horizontal bar above the results (pill buttons) When you have 1–3 filters — more compact
SIDEBAR LAYOUT:                          HORIZONTAL LAYOUT:

┌──────────┐ ┌──────────────────┐        ┌─────────────────────────────────┐
│ Filters  │ │                  │        │ Room type: ○Single ●Double ○Apt │
│          │ │   Booking Cards  │        ├─────────────────────────────────┤
│ Room type│ │                  │        │                                 │
│ ○ Single │ │  ┌────┐ ┌────┐  │        │    Booking Cards                │
│ ● Double │ │  │    │ │    │  │        │                                 │
│ ○ Apt    │ │  └────┘ └────┘  │        │   ┌────┐ ┌────┐ ┌────┐         │
│          │ │                  │        │   │    │ │    │ │    │         │
│ Sea view │ │  ┌────┐ ┌────┐  │        │   └────┘ └────┘ └────┘         │
│ ○ Yes    │ │  │    │ │    │  │        │                                 │
│ ○ No     │ │  └────┘ └────┘  │        └─────────────────────────────────┘
└──────────┘ └──────────────────┘

How bookable filtering works

  1. The system loads the custom fields from the API endpoint /api/bookable-filters
  2. Only fields with the following are shown:
    • Post Type: Bookables
    • Display Mode: Fixed
    • Filterable: Yes
    • Visible on Frontend: Yes
  3. For Select/Radio fields — options come from the field definition
  4. For Text/Number fields — options are collected from existing values on bookables
  5. The visitor clicks an option → results are filtered automatically
  6. Active filters are shown as tags above the results

URL parameters (bookables)

Bookable filters use the cf_ prefix:

/bookings?adults=2&children=0&sort=price-desc&cf_room-type=Double&cf_sea-view=Yes

Active filter tags

When the visitor selects filters, tags are shown above the results:

Room type: Double ✕  |  Sea view: Yes ✕  |  Clear all

The visitor can:

  • Click ✕ on an individual tag to remove that filter
  • Click "Clear all" to remove all filters

Filtering logic

The filtering logic is the same for products and bookables:

Situation Logic Example
Same filter, several values OR Room type: Single OR Double
Different filters AND Room type: Double AND Sea view: Yes

Example: If the visitor selects "Double" and "Apartment" for room type, and "Yes" for sea view, the system shows all bookables that are (Double OR Apartment) AND (Sea view: Yes).


Differences between Products and Bookables filters

Property Products Bookables
Filter source Server-side (Handlebars helper) Client-side (JavaScript + API)
Navigation Page refresh No refresh (AJAX)
Layout options Always sidebar Sidebar, Horizontal or None (chosen in the editor)
Category filter Yes (automatic) No (custom fields are used)
Subcategory filter Yes (automatic) No
URL format ?brand=Bosch ?cf_brand=Bosch

Step by step: a complete example for bookables

You want visitors to filter accommodation by room type and sea view.

1. Create the custom field "Room type"

  1. Go to Admin → Custom Fields
  2. Click "Add New Field"
  3. Fill in:
    • Label: Room type
    • Post Type: Bookables
    • Field Type: Radio
    • Options: Single, Double, Apartment, Suite
    • Display Mode: Fixed
    • Filterable: ✅ Yes
    • Visible on Frontend: ✅ Yes
  4. Save

2. Create the custom field "Sea view"

  1. Click "Add New Field"
  2. Fill in:
    • Label: Sea view
    • Post Type: Bookables
    • Field Type: Select
    • Options: Yes, No
    • Display Mode: Fixed
    • Filterable: ✅ Yes
    • Visible on Frontend: ✅ Yes
  3. Save

3. Fill in the values on the bookables

  1. Open every bookable for editing
  2. In the Custom Attributes section choose:
    • Room type: e.g. "Double"
    • Sea view: e.g. "Yes"
  3. Save every bookable

Important: You must fill in the values on every bookable you want filtering to work for. Bookables without a value for a given field will not appear in the results when that filter is active.

4. Choose the filter layout

  1. Open the page where the Booking Search component is
  2. In the editor find the Filter Layout section
  3. Choose "Sidebar" or "Horizontal"
  4. Save the page

5. Test

  1. Open the page with the Booking Search component on the site
  2. You should see the filter options (sidebar or horizontal bar)
  3. Click an option — the results are filtered automatically
  4. Check the URL — it should contain cf_room-type=Double

Troubleshooting — frequently asked questions

Why is my custom field not shown as a filter?

Check all of the following settings:

  1. ✅ Post Type — Is it set to the right type? ("Products" for products, "Bookables" for accommodation)
  2. ✅ Display Mode — Is it "Fixed"? (Only Fixed fields can be filterable)
  3. ✅ Filterable — Is "Enable filtering" ticked?
  4. ✅ Visible on Frontend — Is it ticked?
  5. ✅ Values — Does at least one item have a value for that field?
  6. ✅ Category (optional) — If the field is restricted to categories, is the active category in the list?

Why is the custom field not shown in the editor (Custom Attributes)?

  • Check that Display Mode is set to "Fixed"
  • Selectable fields are NOT shown in the editor — they appear only on the public part of the site
  • Check that the field's Post Type matches the type of page you are editing
  • Check that the page's category matches the field's category (if the field is restricted to categories)

Why does the Booking Search page show an empty sidebar?

  • The sidebar/horizontal bar is shown only if custom fields for Bookables exist
  • Check that the fields are of type Bookables (not Products)
  • For Select/Radio fields — options appear immediately from the definition
  • For Text/Number fields — options appear only after you fill in values on the bookables

Are product filters shown on bookables (or vice versa)?

No. The system strictly separates fields by Post Type:

  • Fields with Post Type "Products" appear only on product pages
  • Fields with Post Type "Bookables" appear only on bookable pages

How many custom fields can I have?

There is no limit. You can create as many fields as you need.

Do custom fields affect SEO?

Custom fields are shown on the product/bookable page, which enriches the content. Google can use this information to understand the content better.

What happens if I delete a custom field?

The field is removed from the admin panel and the filters, but existing values in the JSON files remain saved. This does not affect already saved pages.

Can I use the same field for Products and Bookables?

No. Every field belongs to one Post Type. If you need the same attribute for both types (e.g. "Location"), create two separate fields — one for Products and one for Bookables.

How do I reset all filters?

  • Products: Click the page name in the navigation or remove the parameters from the URL
  • Bookables: Click "Clear all" next to the active filter tags

This guide is part of the official knowledge base for Emit (emit.rs). Emit is a platform for building your own website, online store and booking system - with AI or by yourself. Free during the introductory period.

Start for free What is Emit →