Title: Multiple popups problem
Last modified: December 13, 2021

---

# Multiple popups problem

 *  Resolved [Darko G.](https://wordpress.org/support/users/darkog/)
 * (@darkog)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/multiple-popups-problem/)
 * I noticed that when using this plugin, the plugin doesn’t work with multiple 
   popups on the page. I know this plugin might support displaying only one popup
   per page, however, to avoid breaking up the UI can you control this programatically?
   I mean, if two popups are about to show, can you make sure only one displays.
   Disable the other because obviously two popups can’t be shown at the same time.
   For example if you have 20 popups, 3 of them met the conditions to show, all 
   three show and at the end nothing is really displayed, bonus, when this happens
   on some sites the scroll is gone, UI broken, it’s a hell.
    -  This topic was modified 4 years, 6 months ago by [Darko G.](https://wordpress.org/support/users/darkog/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Bel](https://wordpress.org/support/users/belimperial/)
 * (@belimperial)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15160359)
 * Hi [@darkog](https://wordpress.org/support/users/darkog/)
 * Thanks for writing in!
 * Multiple popups can be displayed on the same page. However, you would need to
   configure the popup settings. We have an article that can guide you to display
   multiple popups. Please see it [Display Multiple Popups at the Same Time](https://docs.wppopupmaker.com/article/196-display-multiple-popups-at-the-same-time)
 * I also suggest checking the targeting condition. May we know if you have used
   an ‘OR’ operator with negative condition or ‘AND’ operator to target the page(
   s) where the popup will display. In case you are using an ‘OR’ operator with 
   negative condition, kindly update it to use the ‘AND’ operator for each targeting
   condition.
 * As for the scroll issue, could you please add the below CSS to your site. There
   might be a conflict to one of your plugins or theme and interferes with the popup
   CSS trigger. You may add it to your Appearance > Customize > Additional CSS.
 *     ```
       .pum-overlay.pum-active,
       .pum-overlay.pum-active .popmake.active {
           opacity: 1 !important;
           display: block !important;
       }
       ```
   
 * I hope that helps. Let us know if the provided solution fix the issues or if 
   you have any questions.
 *  Thread Starter [Darko G.](https://wordpress.org/support/users/darkog/)
 * (@darkog)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15186177)
 * Hi [@belimperial](https://wordpress.org/support/users/belimperial/)
 * That doesn’t fixes the problem.
 * The problem is that popup maker renders all popups that match the conditions 
   set. How can we make it display only one at a time? So if multiple popups match
   specific condition, we should be able to display only one. Also, since we have
   many popups it’s not solution to add other conditions because it becomes a mess
   of conditions and is impossible to track them (think of: only one is sufficient).
 * Best,
    Darko
    -  This reply was modified 4 years, 5 months ago by [Darko G.](https://wordpress.org/support/users/darkog/).
 *  Thread Starter [Darko G.](https://wordpress.org/support/users/darkog/)
 * (@darkog)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15186231)
 * Can you add a filter that will allow to filter the rendered popups so we can 
   programmatically omit the popups.
 * This function in file /classes/Site/Popups.php
 *     ```
       /**
       * Gets the loaded popup query.
       *
       * @return null|WP_Query
       */
       public static function get_loaded_popups() {
               if ( ! self::$loaded instanceof WP_Query ) {
                       self::$loaded        = new WP_Query();
                       self::$loaded->posts = [];
               }
   
               return self::$loaded;
       }
       ```
   
 * Becomes:
 *     ```
       /**
       * Gets the loaded popup query.
       *
       * @return null|WP_Query
       */
       public static function get_loaded_popups() {
               if ( ! self::$loaded instanceof WP_Query ) {
                       self::$loaded        = new WP_Query();
                       self::$loaded->posts = [];
               }
   
               return apply_filters('pum_get_loaded_popups', self::$loaded);
       }
       ```
   
 *  [Bel](https://wordpress.org/support/users/belimperial/)
 * (@belimperial)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15186479)
 * Hi [@darkog](https://wordpress.org/support/users/darkog/)
 * Thank you for getting back.
 * I would need to forward your concern to our developer since it is a code related.
   This would fall under our premium support, and so please could you open a support
   ticket at our support portal, here: [https://wppopupmaker.com/support/](https://wppopupmaker.com/support/)
 * Thank you, and we look forward to hearing from you.
 *  Thread Starter [Darko G.](https://wordpress.org/support/users/darkog/)
 * (@darkog)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15186917)
 * [@belimperial](https://wordpress.org/support/users/belimperial/) i don’t use 
   the premium version. I am talking about the free version.
 *  Thread Starter [Darko G.](https://wordpress.org/support/users/darkog/)
 * (@darkog)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15188175)
 * Ok, i nailed it with using the built-in filters.
 * To render only one popup per request and avoid rendering all others that match
   the conditions, you can add the following filter:
 *     ```
       /**
        * Render only one popup per request. 
        * Once that one popup is dismissed, the next one will show during the next page load.
        * This way you can avoid showing multiple popups at same time which is probably not supported and breaks the site layout at least for us.
        *
        * @param bool $loadable
        * @param int $popup_id
        * @author Darko G. <dg@darkog.com>
        *
        * @return bool
        */
       function pum_popup_is_loadable_20211222($loadable, $popup_id) {
   
       	static $loadable_popups = array();
   
       	if(is_admin()) {
       		return $loadable;
       	}
       	if(!empty($loadable_popups)) {
       		return false;
       	}
       	if($loadable) {
       		$loadable_popups[$popup_id] = 1;
       	}
       	return $loadable;
       }
       add_filter( 'pum_popup_is_loadable', 'pum_popup_is_loadable_20211222', 0, 2);
       ```
   
 * Have a nice holidays.
    -  This reply was modified 4 years, 5 months ago by [Darko G.](https://wordpress.org/support/users/darkog/).
    -  This reply was modified 4 years, 5 months ago by [Darko G.](https://wordpress.org/support/users/darkog/).
    -  This reply was modified 4 years, 5 months ago by [Darko G.](https://wordpress.org/support/users/darkog/).
 *  [Bel](https://wordpress.org/support/users/belimperial/)
 * (@belimperial)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15189762)
 * Hi [@darkog](https://wordpress.org/support/users/darkog/)
 * Thank you for getting back, and sharing the solution you made.
 * I’ll inform our developer about the filter that you have used. Please do let 
   us know if there’s anything else we can help you with.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Multiple popups problem’ is closed to new replies.

 * ![](https://ps.w.org/popup-maker/assets/icon-256x256.gif?rev=3097653)
 * [Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder](https://wordpress.org/plugins/popup-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-maker/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Bel](https://wordpress.org/support/users/belimperial/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-popups-problem/#post-15189762)
 * Status: resolved