Front-end shortcodes

Fenómenus registers a small set of shortcodes used by the archive templates and available anywhere on the front end.

The shortcodes

Shortcode Output
[category_nav] The category navigation for the current menu archive
[allergens_filter] The allergen filter form
[allergens_list] The allergen library, with the visibility toggle and information panel
[post_allergens] The allergen icons for one item
[favorite_posts] The guest's saved items
[langswitcher] A language switcher
[current_post_type_plural] The plural label of the current menu type
[active_post_type_columns] A tile grid linking to the enabled menus

[category_nav]

Renders the navigation for the current context — a menu archive or a category archive.

Attribute Default Effect
show_subnav true Whether the current category's subsections are rendered

Everything else comes from settings: the flat/nested mode and the utility toggles are per menu type. The navigation returns nothing when there is no context, no terms, or only a single term.

It is also injected automatically into archive templates that do not already contain it, so adding it manually is only necessary in custom markup.

[allergens_filter]

Renders the selectable allergen tags and the Filter action. Outputs nothing outside a menu archive whose content type carries allergen information.

Applying the filter sets a 30-day cookie and reloads the archive with the a_la_carte_allergens query parameter.

[allergens_list]

Renders the allergen library.

Attribute Default Effect
show_toggle yes Renders the Show allergens in dishes switch
toggle_default on The switch's initial state for a guest with no stored preference

Outside a supported archive it renders a short line inviting guests to ask staff about allergens.

[post_allergens]

Attribute Default Effect
post_id Current post The item whose allergens are rendered

Returns nothing when the item has no allergens.

[favorite_posts]

Renders the guest's saved items, grouped by menu type and section. The collection lives in the guest's browser; the shortcode renders whatever that device holds.

Nothing about the collection is stored server-side, so there is no data to read from an integration.

[current_post_type_plural]

Returns the plural label of the current menu type — useful for headings that must follow a renamed menu.

[active_post_type_columns]

A tile grid linking to the enabled menus, intended for a home page.

Attribute Effect
show_<post_type> Include or exclude a specific menu type
add_home_link Include a home tile
add_lang_switcher Include a language switcher in the top row
link_target category_archive (default) or the post type archive
extra_link_url, extra_link_label, extra_link_background_image One additional custom tile

The default link_target is category_archive, because a menu type does not necessarily publish an archive of its own.

Guidance

  • Use [category_nav] rather than building navigation from terms: it reproduces the ordering, the flat/nested setting and the utility toggles.
  • Expect empty output. Every one of these returns nothing when its context is missing.
  • Do not use [allergens_list] as a substitute for per-item allergen data; it lists the library, not a dish.