---
title: "How to Show WordPress Popup Based on URL Parameter?"
url: https://nexterwp.com/docs/show-wordpress-popup-based-on-url-parameter/
date: 2025-03-19
modified: 2026-09-14
lang: en
author: "Aditya Sharma"
description: "One page, two audiences: the people who clicked your campaign link, and everyone else. This condition shows the popup only when the address carries a parameter you name, so a..."
image: https://nexterwp.com/wp-content/uploads/2025/03/show-wordpress-popup-based-on-url-parameter-1024x519.jpg
word_count: 474
---

# How to Show WordPress Popup Based on URL Parameter?

## Key Takeaways

- Popup Builder in Nexter Blocks Pro shows a popup only when the URL includes a matching parameter such as ?email=true, so the plain address does not render it.
- The server-side check requires the literal value true, and ?email=1 or ?email=yes does not match.
- Page caching can serve the wrong version of the page, so the parameter needs to be excluded from cache or tested with caching off first.

One page, two audiences: the people who clicked your campaign link, and everyone else.

This condition shows the popup only when the address carries a parameter you name, so a campaign link can open it while the plain address does not.

*For every Popup Builder setting in one place, see the [Popup Builder block guide](https://nexterwp.com/docs/add-popup-builder-in-wordpress/).*

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

## Before You Start

- **Edition:** **Pro** — the Popup Builder block is part of Nexter Blocks Pro.- **Block to enable:** Popup Builder, switched on under **Nexter > Blocks** in your WordPress dashboard.- **The popup's content decided:** a short message, a form, or a saved pattern to load into it.

## Steps

- Add the **Popup Builder** block to your page and click **Design from Scratch**.

- In the **Content** panel, choose a **Type** and set the popup's size.

![The Content panel with the Type setting](https://nexterwp.com/wp-content/uploads/2026/09/popup-builder-type.webp)

- Set **Content Type** and add what the popup should show.

![The Content Type setting with Pattern, Content, Editor and Shortcode](https://nexterwp.com/wp-content/uploads/2026/09/popup-builder-content-type.webp)

- Open **Display Conditions** and switch **Based on URL Parameter** on.

![The Display Conditions panel with Based on URL Parameter and its URL field](https://nexterwp.com/wp-content/uploads/2026/09/popup-builder-url-param.webp)

- Enter a URL containing the parameter, written as **?email=true**. The block reads the parameter name from what you type.

- Share the page address with that parameter on the end, for example *https://example.com/plans/?email=true*.

- Publish the page and test it on the front end.

> *A popup can have more than one display condition switched on at once. Leave **On Button Click** on only if you also want the button to open it.*

## How It Behaves

- This condition is decided **on the server**. When the parameter is missing, the popup is not placed on the page at all — there is no hidden markup to find.- Loading the same page with the parameter present renders the popup normally. Both were verified.- Because the check happens before the page is sent, nothing about the popup is exposed to visitors who should not see it.- **The value has to be exactly `true`.** An address like *?email=1* or *?email=yes* will not match.

## Limitations

- **Pro only.**- Only the literal value `true` matches, so the parameter cannot carry a name, an ID or any other value.- Because the decision happens on the server, page caching can serve a cached copy of the wrong version. Exclude the parameter from your cache, or test with caching off first.- Anyone can add the parameter to the address, so it controls presentation, not access.

## Troubleshooting

### The popup never appears

Check the address really ends with the parameter and the value is exactly **true**. Then check the field in the block contains the parameter too.

### Nothing about the popup is in the page source

That is how this condition works — without a matching parameter the block renders nothing at all.

### It shows for everyone

A cached copy of the page with the popup is being served to visitors without the parameter. Add the parameter to your cache plugin's exclusions.

## Related Docs

- [Show a popup to visitors from a specific URL](https://nexterwp.com/docs/show-popup-arriving-from-specific-url/)- [Show a popup for a specific date and time](https://nexterwp.com/docs/popup-on-specific-date-and-time/)- [Popup Builder block: all settings](https://nexterwp.com/docs/add-popup-builder-in-wordpress/)