---
title: "How to Add a Message Box in WordPress?"
url: https://nexterwp.com/docs/add-a-message-box-in-wordpress/
date: 2024-12-04
modified: 2026-09-18
lang: en
author: "Aditya Sharma"
description: "Some things on a page need to stand apart from the body text — a warning, a delivery notice, a note about an offer that ends on Friday. The Message..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Add-a-Message-Box-in-WordPress_-1024x519.jpg
word_count: 732
---

# How to Add a Message Box in WordPress?

## Key Takeaways

- Message box muestra un solo bloque con icono, título, descripción, botón y botón de cierre, y el título es el único texto visible por defecto.
- Descripción solo se renderiza cuando el interruptor está activado y el campo de texto tiene contenido; si falta uno de los dos, no aparece ningún elemento de descripción.
- Icono controla la flecha: la flecha se dibuja sobre el icono, así que al apagar el icono también desaparece la flecha; la posición del icono puede pasar a postfix.
- Botón se coloca en la misma fila del título, en el borde derecho, mientras la descripción ocupa toda la anchura debajo; cerrar solo oculta el bloque para esa vista y vuelve tras recargar.

Some things on a page need to stand apart from the body text — a warning, a delivery notice, a note about an offer that ends on Friday.

The Message box gives you that in one block: an icon, a title, a description, a button and a close button, all styled together.

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/blocks/wordpress-message-box/)

## Before You Start

- **Edition:** Free — works in Nexter Blocks (free) and with Nexter Blocks Pro.- **Block to enable:** Message box, switched on under **Nexter > Blocks** in your WordPress dashboard.

## Video Tutorial

## Steps

- Add the **Message box** block to your page.

![Adding the Message box block](https://nexterwp.com/wp-content/uploads/2024/12/message-box-activate-new-1.png)

- Type your **Title**. This is the only text shown by default.

- Switch **Description** on *and* type the description text — it needs both.

![The description toggle and text field](https://nexterwp.com/wp-content/uploads/2024/12/message-box-design-type-1024x190.png)

- Choose an **Icon** and whether it sits before or after the text.

![Choosing the icon and its position](https://nexterwp.com/wp-content/uploads/2024/12/message-box-button-new.png)

- Switch the **close button** or a **button** on if you want them, then publish and check the page.

![The close button and button options](https://nexterwp.com/wp-content/uploads/2024/12/message-box-style-new.png)

> ***The description needs both switches.** Measured separately in both directions: with the toggle on and the text box empty, and with text typed but the toggle off, no description element is rendered at all.*

## How It Behaves

The Message box is a single styled box with up to four parts — an icon, a title, a description and a button — plus an optional close button. It is the block to reach for when a page needs a notice that stands apart from the body text.

- **Only the title shows by default.** Measured on a default block: icon, arrow and close button are on, and the description is off until you switch it on.- **The description needs both switches.** Measured separately in both directions: with the toggle on and the text box empty, and with text typed but the toggle off, no description element is rendered at all.- **The arrow only exists if the icon does.** Measured with the icon switched off and the arrow switched on: there is no arrow anywhere on the page. The arrow is drawn on the icon, so switching the icon off removes both.- **Icon position moves the icon, not just its alignment.** Measured: setting it to postfix moves the icon after the text in the page itself, and the arrow follows it.- **The button sits on the title's row, at the right edge** — not underneath the message. Measured with a title, a description and a button all switched on: the title and the button share the top row and the description runs full width below them.- **The close button hides the box for that page view only** — measured, it is back after a reload.

> *There is no separate alert box block or preset — an alert box is this same Message box with alert styling. The block's own default title, "Special Alert message for you. Got it?"*, is why it is often described that way.

## Limitations

- **Closing is not remembered.** Measured: the box returns on reload. There is no setting to keep it dismissed for a returning visitor.- **The arrow depends on the icon** — measured, no icon means no arrow.- **One message per block.** For several notices, add several blocks.- An empty box is invisible rather than obviously broken — see Troubleshooting.

## Troubleshooting

### My description does not appear

Measured in both directions: the description renders only when the toggle is on *and* the text field has content. Check both.

### The arrow is switched on but there is no arrow

The icon is switched off. Measured: the arrow is drawn on the icon, so it disappears with it. Switch the icon back on.

### The box is there but nothing shows in it

With the icon, close button and title all switched off and no description, the block renders a box measuring 1092 by 0 pixels — measured, present on the page but with nothing in it, and no error to explain why. Switch the title, icon or description back on.

### The message comes back after closing it

That is expected. Measured: closing hides the box for that page view only and a reload brings it back. Nothing is stored about the dismissal.

### My button is beside the title instead of below the message

That is where it sits. Measured with a title, description and button on: the button shares the title's row at the right edge. See the [message box button guide](https://nexterwp.com/docs/add-a-button-in-a-wordpress-message-box/).

## Related Docs

- [Create an alert box in WordPress](https://nexterwp.com/docs/create-an-alert-box-in-wordpress/)- [Add a close button to a message box](https://nexterwp.com/docs/add-close-button-in-alert-box-message-box-in-wordpress/)- [Add a button in a message box](https://nexterwp.com/docs/add-a-button-in-a-wordpress-message-box/)

## Frequently Asked Questions

**Q: Why does the description not show in a WordPress message box?**
A: The description only renders when both parts are set: the Description switch has to be on and the text field has to contain content. If either one is missing, Nexter Blocks does not output a description element at all. That matters because an empty toggle can make the block look broken when it is really just incomplete. In Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter this is a hard requirement, not a styling issue.

**Q: Why is there no arrow even though the arrow option is switched on?**
A: The arrow is tied to the icon, not to the arrow switch by itself. If the icon is switched off, the arrow disappears too because it is drawn on the icon. That means the fix is to keep the icon enabled if you want an arrow visible. This behavior is part of the Message box block in Nexter Blocks, and it explains why turning off the icon can remove two visual pieces at once.

**Q: What should I do if my message box looks empty on the page?**
A: An empty Message box can still render as a box with no visible content when the title, icon, and close button are all switched off and there is no description. The page measured that state at 1092 by 0 pixels, so it exists in the layout but gives you nothing to see. The practical fix is to turn back on at least one visible part such as the title, icon, or description so the block has something to display.

**Q: Does closing a message box hide it for returning visitors?**
A: Closing only hides the Message box for that page view. A reload brings it back, so dismissal is not remembered for later visits. That makes it useful for temporary notices rather than persistent alerts. If you need a notice that stays dismissed across visits, this page does not describe that behavior for the Message box in Nexter Blocks.

**Q: Can I put a button below the message text in a WordPress message box?**
A: The button sits on the title row at the right edge when it is enabled. It does not drop underneath the description, even when title, description, and button are all turned on. The layout measured on this page puts the title and button across the top row while the description runs full width below them. For button placement details, see [Add a button in a message box](https://nexterwp.com/docs/add-a-button-in-a-wordpress-message-box/).

**Q: Is there an alert box block in WordPress or is it just a message box?**
A: The alert box is this same Message box with alert styling. The page says there is no separate alert box block or preset, and that its default title, “Special Alert message for you. Got it?”, is why people often call it an alert box. That makes Message box the right block when you want a notice that stands apart from body text. For related setup details, see [Create an alert box in WordPress](https://nexterwp.com/docs/create-an-alert-box-in-wordpress/).
