Callouts: [wpsd-callout]
Callouts are highlighted boxes for info, tips, warnings, danger notices, and notes. They’re added with a shortcode, so they work in the block editor or the classic editor.
Basic usage#
[wpsd-callout type="warning" title="Watch out"]
Don't run this in production without a backup.
[/wpsd-callout]
Don’t run this in production without a backup.
In the block editor, paste this into a Shortcode block, a Custom HTML block, or directly inside a Paragraph block. There’s no dedicated callout block, just the shortcode itself.
Available types#
| Type | Use for |
|---|---|
info (default) | General information |
tip | Helpful suggestions or shortcuts |
warning | Something readers should be careful about |
danger | Serious risks, like data loss or breaking changes |
note | Supplementary asides |
If you leave off type entirely, or use a value that isn’t one of these five, the callout falls back to info.
The title#
The title attribute is optional. If you leave it out, the callout uses a default label matching its type, for example “Warning” for a type="warning" callout. Set title only when you want something more specific.
[wpsd-callout type="tip"]
This uses the default "Tip" title.
[/wpsd-callout]
[wpsd-callout type="tip" title="Keyboard shortcut"]
This uses a custom title instead.
[/wpsd-callout]
This uses the default “Tip” title.
This uses a custom title instead.
Content inside a callout#
You can use normal paragraphs, lists, and other shortcodes inside a callout. Blank lines become separate paragraphs. HTML lists work too.
[wpsd-callout type="danger" title="Before you upgrade"]
Back up your database first.
This step can't be undone once you proceed.
[/wpsd-callout]
Back up your database first.
This step can’t be undone once you proceed.
For a bulleted list inside a callout, use an HTML list directly:
[wpsd-callout type="warning" title="Only use this plugin if"]
<ul>
<li>You are the account holder</li>
<li>You are installing on client sites hidden from all other users</li>
</ul>
[/wpsd-callout]
- You are the account holder
- You are installing on client sites hidden from all other users
Custom color#
Pass any hex value to the color attribute and the callout will derive a matching border, background tint, and title colour from it automatically. Both #rgb shorthand and full #rrggbb values are accepted.
[wpsd-callout color="#7c3aed" title="Beta feature"]
This is still in preview and the API may change.
[/wpsd-callout]
This is still in preview and the API may change.
You can combine color with type, the type still sets the default title if you don’t provide one, but the colour overrides the visual style.
Custom icon#
Pass any image URL to the icon attribute to replace the built-in icon with your own. SVG files from your media library work best since they scale cleanly, but PNG and WebP work too. The icon renders at 22×22 px to match the built-in icons.
[wpsd-callout type="tip" icon="https://yoursite.com/wp-content/uploads/star.svg" title="Pro tip"]
Your content here.
[/wpsd-callout]
Your content here.
You can combine color and icon together for a fully custom callout with no dependency on the built-in types:
[wpsd-callout color="#0ea5e9" icon="https://yoursite.com/wp-content/uploads/info-icon.svg" title="Did you know"]
Combining color and icon gives you complete control over how the callout looks.
[/wpsd-callout]
Combining color and icon gives you complete control over how the callout looks.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!