Alert Box Shortcode Examples

Use these alert box examples to display clear warning, error, success, or informational messages. Each style supports an optional caption and an optional close button.

Choose the example that best fits your message, then adapt the shortcode content for your page.

Warning alert boxes

Use a warning alert when someone should review an important detail before continuing.


[alertbox1 caption=”Warning” close=”true”]Please review this important message before continuing.[/alertbox1]

[alertbox1 caption=”Warning”]This warning alert includes a caption without a close button.[/alertbox1]

[alertbox1]This warning alert has no caption or close button.[/alertbox1]

[alertbox1 close=”true”]This warning alert can be closed and has no caption.[/alertbox1]

Error alert boxes

Use an error alert to explain that an action needs attention or could not be completed.


[alertbox2 caption=”Error” close=”true”]Something needs your attention before you can continue.[/alertbox2]

[alertbox2 caption=”Error”]This error alert includes a caption without a close button.[/alertbox2]

[alertbox2]This error alert has no caption or close button.[/alertbox2]

[alertbox2 close=”true”]This error alert can be closed and has no caption.[/alertbox2]

Success alert boxes

Use a success alert to confirm that an action was completed.


[alertbox3 caption=”Success” close=”true”]Your action was completed successfully.[/alertbox3]

[alertbox3 caption=”Success”]This success alert includes a caption without a close button.[/alertbox3]

[alertbox3]This success alert has no caption or close button.[/alertbox3]

[alertbox3 close=”true”]This success alert can be closed and has no caption.[/alertbox3]

Information alert boxes

Use an information alert to share helpful context, instructions, or a neutral update.


[alertbox4 caption=”Info” close=”true”]Here is helpful information for the next step.[/alertbox4]

[alertbox4 caption=”Info”]This information alert includes a caption without a close button.[/alertbox4]

[alertbox4]This information alert has no caption or close button.[/alertbox4]

[alertbox4 close=”true”]This information alert can be closed and has no caption.[/alertbox4]

Alert box options

  • caption adds a label at the top of the alert, such as “Warning” or “Success.”
  • close=”true” adds a close button to the alert.
  • Omit either option when you need a simpler message box.

Frequently asked questions

Which alert box should I use?

Use warning for important cautions, error for issues that need attention, success for completed actions, and info for helpful context or updates.

How do I add a caption to an alert box?

Add the caption attribute to the shortcode, such as caption=”Warning” or caption=”Success.”

How do I make an alert box closable?

Add close=”true” to the shortcode attributes.

Can I use an alert box without a caption?

Yes. Omit the caption attribute to display an alert without a caption.

Back to Top
Product has been added to your cart
Compare (0)