Inicio - Documentación - POM Theme - 09 Shortcodes - 09.1 Shortcodes reference - `web_accordion_content` Shortcode

web_accordion_content Shortcode

The web_accordion_content shortcode renders the accordion content component.

The attributes below match the current Page Builder controls and public output. Use raw syntax only for reviewed content that cannot be maintained through the visual controls.

Allowed parent shortcodes: web_accordion.

Usage

[web_accordion_content]
Content
[/web_accordion_content]

Attributes

Attribute Default Accepted values Purpose
title String unless stated otherwise Enter section title (Note: you can leave it empty).
subtitle String unless stated otherwise Enter section subtitle (Note: you can leave it empty).
open_by_default yes If checked accordion will be opened by default.
heading_color 15 Palette number 115, or empty to inherit Applies the matching text-color helper to the heading.
icons_color 15 Palette number 115, or empty to inherit Applies the matching text-color helper to the icons.
tab_id Generated when omitted Unique HTML ID suffix The expandable body ID is accordion- followed by this value.
title_tag none none, h1, h2, h3, h4, h5, h6, span Controls the title tag.
el_class String unless stated otherwise If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.
el_id String unless stated otherwise Sets a unique HTML ID on the rendered element.

Enclosed content

Content between the opening and closing tags is processed as WordPress shortcode content. Keep the parent/child structure shown by the visual builder so nested components receive the context they expect.

Device visibility belongs to the parent web_accordion; the item does not have a separate device-visibility attribute. el_id identifies the item's outer wrapper, independently of the expandable body's tab_id.

For a stable direct link, set tab_id="delivery" and link to #accordion-delivery. The page opens that panel and its enclosing accordion panels. Do not rely on an automatically generated ID for a permanent link. The icons use the current theme brand settings when the shortcode renders.

Render prepared HTML from PHP

Integrations that already produce safe HTML can call pom_render_accordion_panel($attributes, $html). It accepts the item attributes above and renders the same theme panel, icons and accessible controls. The supplied body is emitted unchanged, so the caller must sanitize it first; the helper does not apply paragraph formatting or execute shortcodes.

Place the returned panels inside a web-accordion container and request their existing theme assets with pom_maybe_enqueue_block_assets('accordion'). Use a unique tab_id for each panel. The ordinary web_accordion_content shortcode continues to prepare enclosed WordPress shortcode content as before.

Verification

Keep web_accordion_content inside web_accordion; verify the child order and the parent interaction on the public page. Pay particular attention to title and subtitle.