Shortcode reference

Every shortcode and attribute — the gallery, the category carousel and single-case embeds.

The plugin provides three shortcodes. The first is in the free plugin; the other two are Pro.

Embeds the complete, filterable gallery.

AttributeDefaultDescription
items_per_page6Cases loaded per page.
default_categoryallCategory slug to show first.
show_filterstrueShow the filter controls.
show_ctafrom settingsShow the consultation CTA button.
cta_textfrom settingsOverride CTA label.
cta_linkfrom settingsOverride CTA URL.
[medbeafgallery default_category="botox" items_per_page="9"]

A sliding carousel of cases from a category, powered by Splide.

AttributeDefaultDescription
category(all)Category slug to display.
items_per_view3Slides visible at once (1–5).
autoplayfalseAuto-advance slides.
autoplay_speed3000Delay between slides, ms (1000–15000).
show_navigationtrueShow prev/next arrows.
show_dotstrueShow pagination dots.
looptrueInfinite loop.
gap20Space between slides, px.
[mba_category_carousel category="facelift" items_per_view="4" autoplay="true" autoplay_speed="5000"]

Clicking a carousel item opens the same case modal as the main gallery. There’s a generator under Before After Gallery → Settings → Carousel that builds the shortcode for you.

[mba_case] — single case (Pro)

Embeds one full case inline — viewer, pair navigation and (optionally) the treatment overview and description.

AttributeDefaultDescription
id(required)The case’s post ID.
show_detailstrueShow treatment overview + description.
show_ctatrueShow the CTA button (if configured).
[mba_case id="123" show_details="true"]

A generator under Settings → Single Case lets you pick a published case and copy the shortcode.

Using shortcodes in builders

All three work in the Block editor (Shortcode block), Classic editor, and page builders such as Elementor, Divi and WPBakery via their shortcode widgets. You can place multiple carousels and single-case embeds on the same page.