Alert

An alert displays a styled message. The content between the opening and closing tags is shown inside the alert; an optional heading is rendered above it.

Alert examples
Alert examples

Example

[bsv-alert style="info" heading="Heads up" dismissible="yes"]This is an alert.[/bsv-alert]

Format

[bsv-alert parameter="value" ...]your text here[/bsv-alert]

Parameters

Parameter Description Default
style Bootstrap color style: primary, secondary, success, danger, warning, info, light, dark. primary
heading Optional heading text. empty
heading_level HTML heading level for the heading: h1–h6. h4
dismissible Show a close button and allow the alert to be dismissed: yes or no. The close button is hidden when JavaScript is unavailable. no
width Optional width using px, %, em or rem, for example 50% or 400px. full width

The alert content is passed through wp_kses_post.

Last updated: