WP Popups’ 30+ display rules let you control exactly where your popups display and who sees them. You can use display rules to only show your popups to logged-in users, limit your popups to certain pages, plus a whole lot more.
In this article, you’ll learn what display rules are available to you, as well as how to add display rules to your popups and mix-and-match them as needed using rule groups.
Available Display Rules in WP Popups
WP Popups and its add-ons include over 30 different display rules.
Here is a full list of display rules, divided by type:
Page & Post
Page & Post display rules let you limit your popups to certain content or types of content.
- Page – target a specific page by name.
- Page Parent – target all pages that have a certain parent page.
- Page Template – target all pages that use a specific template.
- Page Type – target all pages or specific types of pages, like your search page.
- Post – target a specific post by name.
- Post Category – target all posts in a specific category.
- Post Format – target all posts that use a specific format.
- Post ID – target specific post(s) by ID.
- Post Status – target all posts with a certain status. E.g. all published posts.
- Post Taxonomy – target all posts with a certain taxonomy, including tags or custom taxonomies.
- Post Type – target a specific post type, including posts, pages, or any custom post types that you might be using.
The user display rules let you target specific users, including both WordPress and non-WordPress conditions:
- User came via a search engine – whether or not the user came from a search engine, like Google.
- User did not arrive via another page on your site – whether or not a user clicked on a piece of content from another page on your site.
- User is logged – whether or not a user is logged in to your WordPress site.
- User never left a comment – whether or not a user has previously left a comment on your site.
- User role – target all logged-in users with a specific WordPress user role.
- User visited N pages of your site – target all users who have visited N number of pages.
- Bots/Crawlers – whether or not a visitor is a bot, like Googlebot.
- Browser – target all visitors using a specific web browser, like Chrome.
- Custom URL – target any URL on your site.
- Desktop – target all visitors who are browsing on a desktop computer.
- Mobile phone – target all visitors who are browsing on a mobile phone.
- Popup converted – target visitors who have previously converted on another one of your popups. This lets you create personalized messages for visitors who have already converted.
- Query string – target a specific query string in your URLs.
- Referrer – target all visitors coming from a specific referring site. E.g. you can create a dedicated popup for people visiting from a guest post that you published.
- Tablet – target all visitors who are browsing on a tablet.
- URL contains keyword – target all pages on your site that include a certain keyword in their URL structure.
With WP Popups add-ons, you can also get access to additional display rules.
- City – target visitors in a specific city.
- Country – target visitors in a specific country.
- State – target visitors in a specific state.
- Zip – target visitors in a specific zip code.
- Date is – only display your popup on certain dates or within a certain date range.
- Local time is – only display your popup during certain times of day.
- Weekday is – only display your popup on certain days of the week. E.g. Monday or Tuesday.
How to Set Display Rules in WP Popups
To add a display rule to your popup:
- Open the WP Popups template builder for the popup that you want to add a display rule to.
- Click on the Display Rules tab.
The default display rule configuration is Page Type / is equal to / All Pages. This will display your popup to all visitors on every single page of your site.
To use a different display rule, first use the drop-down on the left to pick your desired display rule:
Then, use the middle drop-down to choose between is equal to or not equal to:
- Is equal to – the popup will only appear when this condition is met.
- not equal to – the popup will appear in all situations except when this condition is met.
Finally, use the right-most drop-down to select the specific condition. For example, if you want to target a category of posts, you could select the exact category to target:
Let’s look at two examples to showcase the difference between is equal to and not equal to:
Here’s the first scenario:
Post Category / is equal to / WordPress Tutorials
With this configuration, the popup will only appear on blog posts that are in the “WordPress Tutorials” category.
Here’s the second scenario:
Post Category / not equal to / WordPress Tutorials
With this configuration, the popup will appear on all content except blog posts that are in the “WordPress Tutorials” category.
How to Combine Display Rules Using AND/OR
For most popups, you’ll likely want to use multiple display rules. To organize your display rules, WP Popups lets you create different rule groups.
You can add unlimited rule groups to your popups, and each rule group can contain unlimited display rules.
In order for a popup to appear, at least one rule group must be true.
In order for a rule group to be true, all of the conditions inside that specific rule group must be met.
To add new display rules to a rule group, you can click the +AND button in that rule group.
To add a new rule group, you can click the Add rule group (OR) button.
Let’s look at two examples to illustrate how rule groups work.
In this first example, there are two rule groups, each with a single display rule targeting a category of posts:
With this configuration, the popup will display on all posts that are in the “WordPress Tutorials” category OR the “WordPress Plugins” category.
However, let’s say you changed the configuration and instead included both display rules in the same rule group:
Now, the popup will only appear on blog posts that are in both the “WordPress Tutorials” AND “WordPress Plugins” category at the same time.
In this example, there are three rule groups, each of which includes multiple display rules:
There are three scenarios in which this popup will display:
- A visitor is logged in to your WordPress site AND looking at a post in the “WordPress Tutorials” category.
- A logged-in visitor has the “Subscriber” user role AND is looking at a post in the “WordPress Plugins” category.
- A visitor is not logged-in to WordPress AND is using a desktop computer.
As long as one of those scenarios is true, the popup will display.