Using popups to generate more membership signups or show exclusive offers to members only can be a great addition to your membership site. But, how do you filter popups to target the RIGHT audience?


Enter the filters…

The code recipes below demonstrate how to filter popups based on the user or site visitor’s membership level. We like using this method in combination with the new Signup Shortcode Add On for a streamlined “Unlock this post now” experience.

This post covers the filter methods for Popup Maker, Popups – WordPress Popup, Popup Builder, and Optin Monster.

If you are using a different popup plugin, post a topic on our support forum (members-only) and we will help you with the filter for your setup.

Popup Maker — WordPress Repo | Plugin Homepage

When I began this post, I was looking in the WordPress plugin repository for a basic, open source popup plugin with simple styling options: enter Popup Maker.

This code recipe will filter the display of a popup using Popup Maker’s pum_popup_is_loadable filter. The recipe hides the popup if there is a logged in user with membership level ID 1. You can modify the recipe for your level IDs, or change the conditional to require level ID 1 or an array of level IDs.

This code recipe requires a PMPro Plus Account or higher.

View Membership Options


Popups – WordPress Popup — WordPress Repo | Plugin Homepage

This open source option is loaded with integrations for popular third-party form plugins and engagement tools. There are some built-in filters for the popup display cases, just not for membership level…

This code recipe will filter the display of a popup using the Popups plugin’s custom rules filter. The recipe enables the popup ONLY for a logged in user with membership level ID 1. You can modify the recipe for your level IDs, or change the conditional to hide for level ID 1 or an array of level IDs.

This code recipe requires a PMPro Plus Account or higher.

View Membership Options


Popup Builder — WordPress Repo | Plugin Homepage

This is a more bare-bones popup option, but for my testing did just what I needed it to do without hassle.

This code recipe will insert the selected popup shortcode via wp_footer throughout your site to any non-member. You can modify the recipe for your level IDs, or change the conditional to hide for level ID 1 or an array of level IDs.

This code recipe requires a PMPro Plus Account or higher.

View Membership Options


OptinMonster — Plugin Homepage

OptinMonster is more than just a popups plugin, with premium features for inserting optin forms in posts, in a floating bar, based on exit-intent and more. A paid account (starting at $49/yr) is required to use the plugin.

This code recipe will remove the optin using a script placed via the wp_footer action. The recipe hides to popup for all logged in users with any membership level. You can modify the recipe for your level IDs, or change the conditional to enable the popup for members only.

This code recipe requires a PMPro Plus Account or higher.

View Membership Options


If you are using a different popup plugin, post a topic on our support forum (members-only) and we will help you with the filter for your setup.

Thanks for this!!

I was using WordPress PopUp before and LOVED it. However, after the most recent update to that plugin, it actually shut down my whole site because of 49 simultaneous fatal errors. I had to have WP Engine go in and remove the plugin from their end to get my site back up and running.

Just a word of caution. If it works for you site, then I highly recommend it.

Has anyone else tested that plugin in the last few days?

We tried adding the Popup Maker plugin and the code provided here from PMP for only showing popups to members. The code pmp provided did disable the popup for members, but for some reason it also stops the “conditions” from working in the Popup Maker plugin settings. This means with the pmp code added, we couldn’t set the popup to only show up for particular pages (that setting for popup making wasn’t working anymore). It would only show up for all pages for non-members.

If anyone knows a fix we would appreciate the help.

You need to change the logic of the if/then/else condition in the code above. The $is_loadable parameter in that function will be set to true/false depending on the conditions and other code that hooks in before PMPro.

So if you simply returned $is_loadable, the conditions would work obviously.

If you wanted members to NOT see the popups, you would do something like:

`if ( function_exists(‘pmpro_hasMembershipLevel’) && pmpro_hasMembershipLevel() ) $is_loadable = false;` //users of any level don’t see the popup

You could change that to check for certain levels/etc.

Hope this helps. The exact answer depends on your levels and some other things.

Leave a Reply

Your email address will not be published. Required fields are marked *