---
title: "How to Add a Coupon Code in WordPress?"
url: https://nexterwp.com/docs/add-a-coupon-code-in-wordpress/
date: 2024-12-31
modified: 2026-09-15
lang: en
author: "Aditya Sharma"
description: "A discount code printed as plain text gets skimmed past. This block makes claiming one an action — a button that reveals the code, or a card the visitor peels,..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Add-a-Coupon-Code-in-WordPress_-1024x519.jpg
word_count: 646
---

# How to Add a Coupon Code in WordPress?

## Key Takeaways

- Nexter Blocks Pro incluye el bloque Coupon Code, y se activa en Nexter > Blocks dentro del panel de WordPress.
- Standard usa el campo Code y Redirect Link, y ofrece cinco estilos Standard para mostrar el código con un botón o abrirlo en un popup.
- Peel, Scratch y Slide Out guardan el descuento en Back Description, porque el campo Code solo funciona con Standard.
- Scratch dibuja un canvas real sobre la tarjeta, usa Fill Percent para definir cuánto se limpia antes de mostrar el código y no funciona para usuarios que usan teclado.

A discount code printed as plain text gets skimmed past.

This block makes claiming one an action — a button that reveals the code, or a card the visitor peels, scratches or slides open.

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

## Before You Start

- **Edition:** **Pro** — the Coupon Code block is part of Nexter Blocks Pro.- **Block to enable:** Coupon Code, switched on under **Nexter > Blocks** in your WordPress dashboard.- **The code itself**, and the page you want people sent to.

https://www.youtube.com/watch?v=SWNyvZjAga0

## Steps

- Add the **Coupon Code** block and click **Design from Scratch**.

- Set **Coupon Type** to **Standard**.

![The Coupon Type setting with Standard, Peel, Scratch and Slide Out](https://nexterwp.com/wp-content/uploads/2026/09/coupon-type.webp)

- Pick a **Standard Style** — there are five.

![The Standard Style setting](https://nexterwp.com/wp-content/uploads/2026/09/coupon-style.webp)

- Put your discount code in **Code** and the destination in **Redirect Link**.

![The Code field](https://nexterwp.com/wp-content/uploads/2026/09/coupon-code.webp)

- Choose **Select Action** — reveal the code in place, or open it in a popup.

![The Select Action setting](https://nexterwp.com/wp-content/uploads/2026/09/coupon-action.webp)

- Publish and click the coupon.

> ***The code is in the page before anyone clicks.** Measured on the front end: both the button label and the code are in the markup from the start, just hidden until the reveal. This is a presentation effect, not a way to gate a discount — anyone reading the page source has it.*

## The Four Coupon Types

| Coupon Type | What the visitor does | Guide |
| ----------- | --------------------- | ----- |
| Standard | Clicks a button and the code appears | — |
| Peel | Peels back a corner to find the code | [Peel-off card](https://nexterwp.com/docs/create-a-peel-off-discount-code-card-in-wordpress/) |
| Scratch | Scratches a surface away | [Scratch card](https://nexterwp.com/docs/create-a-scratch-coupon-card-in-wordpress/) |
| Slide Out | Slides a panel aside | [Slide-out card](https://nexterwp.com/docs/create-a-slide-out-discount-code-card-in-wordpress/) |

## Where the Code Goes

This trips people up, because the editor does not say so. **The Code field is used by the Standard type only.** On Peel, Scratch and Slide Out the card has a front and a back, and the discount belongs in **Back Description**.

| Coupon Type | Put the code in |
| ----------- | --------------- |
| Standard | **Code** |
| Peel, Scratch, Slide Out | **Back Description** (or a pattern on the back) |

## How It Behaves

- **A Standard coupon is a link.** The whole thing is an `<a href>` pointing at Redirect Link, so clicking it takes the visitor to your site. See [the redirection guide](https://nexterwp.com/docs/add-a-coupon-code-with-redirection-in-wordpress-new-tab-or-same-tab/) for same tab or new tab.- **Select Action decides where the code appears** — in place, or in a popup with its own title, description, copy button and visit button. See [the discount popup guide](https://nexterwp.com/docs/create-discount-popup-in-wordpress/).- **Scratch draws a real canvas** over the card, and **Fill Percent** sets how much has to be cleared before the code shows.- **Save In Cookies** remembers that a visitor already revealed the code, so they are not asked to do it again.- **The front and back of a card can be a pattern** instead of plain text — see [showing a promo code in a pattern](https://nexterwp.com/docs/show-promo-code-in-a-wordpress-pattern/).

## Limitations

- **Pro only.**- **The code is in the page before anyone clicks.** Measured on the front end: both the button label and the code are in the markup from the start, just hidden until the reveal. This is a presentation effect, not a way to gate a discount — anyone reading the page source has it.- **The Code field is ignored by three of the four types**, as above. A code typed there for a Peel card simply never appears.- **Hide Link (Beta) changes the click.** With it on the coupon reveals the code but no longer navigates — see [the masked link guide](https://nexterwp.com/docs/add-coupon-code-with-masked-link-in-wordpress/).- Scratch needs a pointer or a finger to drag. It works on touch, but not for anyone using a keyboard.

## Troubleshooting

### My code does not appear on the card

You have typed it into **Code**, which only the Standard type uses. Put it in **Back Description** instead.

### Clicking the coupon takes people away from the page

That is the **Redirect Link**, and it is how the Standard type is meant to work. Use the popup action if you would rather keep them on the page.

### People can see the code without clicking

They can — it is in the page source from the start. Treat the reveal as presentation, not protection.

### The block is missing from the inserter

Switch **Coupon Code** on under **Nexter > Blocks**.

![Coupon Code switched on in the Nexter Blocks list](https://nexterwp.com/wp-content/uploads/2026/09/coupon-admin-enable.webp)

## Related Docs

- [Peel-off discount card](https://nexterwp.com/docs/create-a-peel-off-discount-code-card-in-wordpress/)- [Scratch coupon card](https://nexterwp.com/docs/create-a-scratch-coupon-card-in-wordpress/)- [Discount popup](https://nexterwp.com/docs/create-discount-popup-in-wordpress/)- [Coupon with redirection](https://nexterwp.com/docs/add-a-coupon-code-with-redirection-in-wordpress-new-tab-or-same-tab/)

## Frequently Asked Questions

**Q: Why does my coupon code not show up on the card in WordPress?**
A: The usual cause is putting the code in the wrong field. In Nexter Blocks Pro, the Standard type uses the Code field, but Peel, Scratch, and Slide Out store the discount in Back Description instead. That matters because those card types have a front and a back, so the visible reveal comes from the back side. If you typed the code into Code for a Peel card, it will never appear.

**Q: How do I keep a coupon click from sending visitors to another page?**
A: A Standard coupon is built as a link, so its default behavior is to send people to the Redirect Link. If you want them to stay on the page, use Select Action to open the code in a popup instead of using the link behavior. Nexter Blocks Pro also has a Hide Link beta option that changes the click so it reveals the code without navigating.

**Q: Can people see a WordPress coupon code without clicking it?**
A: The reveal is presentation, not protection. The page content says both the button label and the code are already in the front-end markup from the start, just hidden until reveal. That means anyone reading page source can still find it. Nexter Blocks Pro is useful for making claiming feel interactive, but it does not gate access to a discount.

**Q: What coupon type should I use for a reveal button versus a peel or scratch card?**
A: Standard is for a button that reveals the code in place or in a popup. Peel works like peeling back a corner, Scratch uses a scratch-away surface, and Slide Out moves a panel aside. The choice is mostly about presentation and user interaction, since all four are just different ways to expose the discount code on the page.

**Q: Why is my WordPress coupon block missing from the block inserter?**
A: The Coupon Code block is part of Nexter Blocks Pro and has to be switched on under Nexter &gt; Blocks in your WordPress dashboard. If it is disabled there, it will not show up in the inserter at all. That makes this more of an enablement issue than an editor bug.

**Q: Does the scratch coupon card work with keyboard users?**
A: Scratch needs a pointer or finger to drag, so it works on touch but not for anyone using a keyboard. That makes it fine for mobile-style interaction but weak for keyboard-only access. If accessibility matters for your layout, Standard with reveal or popup behavior is usually easier to use than Scratch.
