Skip to main content

Shortcodes overview

Shortcodes are WordPress shortcuts you place in pages, patterns, or templates. Booking Engine Connector registers the following:

ShortcodePurpose
[bec_search]Availability search (GET). Seeds bec_* URL parameters on the form action—by default the units archive (or use redirect_url for another page).
[bec_dates]Human-readable summary of stay dates from the URL.
[bec_quote]Compact availability / price line (optional rate list).
[bec_checkout]External checkout button or POST form.
[bec_booking_summary]Full booking sidebar/card with search, breakdown, mobile drawer.
[bec_unit_url]Outputs only the URL string (for href) keeping search params.
[bec_unit_info]Provider-specific HTML blocks (e.g. amenities grid).
[bec_unit_field]Single scalar from synced provider payload (dot path, e.g. CIN).
[bec_unit_gallery]JSON gallery from canonical attachment IDs (for custom JS).
[bec_unit_filters]Unit listing filters (order, rooms, bathrooms, amenities) via GET.
[bec_available_units_count]Count of units matching filters and availability.
[bec_fallback]Admin-configured fallback link or rich content.
[bec_version]Prints plugin version (support/debug).

One URL ties everything together

Shortcodes do not pass hidden state between each other—they read the same query string. Always ensure your navigation links preserve parameters ([bec_unit_url] helps).


The unit_id attribute pattern

Several shortcodes accept unit_id:

ValueBehaviour
Omitted or 0Uses the current post in the WordPress loop—ideal on singular unit templates.
Positive numberTargets that specific Units post ID (archive cards, reusable blocks).

If unit_id points at something that is not a unit, output is typically empty.


Elementor (optional)

FeatureWhen to use
Loop Grid — Query ID bec_available_only or bec_filtered_unitsHide archive cards with no availability when the URL has complete search params; applies unit filters. See Elementor — hide units with no availability.
Dynamic tag — Unit galleryFill Gallery / Media Carousel widgets from bec_core_gallery. See Elementor — Unit gallery.

Pair [bec_unit_filters] and [bec_available_units_count] above Loop Grid listings on search results pages.


Screenshots per shortcode

Each dedicated page below lists CSS hooks you can style safely with Booking Engine → Design → Extra CSS or your theme stylesheet.

Shortcodes overview collage


Jump in