Support » Plugin: Popups - WordPress Popup » Random popup

  • Resolved dyrer


    Can i have more than one popup for a specific page but with a random display?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support gonzalesc


    Yes, you can do it using the hook “spu/check_for_matches“.

    First you must create 1 or more popups for a single page. For example “”

    After you must put this code in your functions.php

    if( !function_exists('timersys_popup_matches') ) {
    	function timersys_popup_matches($spu_matches, $spu_ids, $spu_rules) {
    		if( is_page('test_page') ) {
    			$key_rand = array_rand($spu_matches, 1);
    			$key_id = current($key_rand);
    			$spu_matches[$key_id] = $key_id;
    		return $spu_matches;
    	add_filter('spu/check_for_matches', 'timersys_popup_matches', 10, 3);

    This work in the page called “test_page”.


    I want to have random popup for all pages not a specific.
    But even with a specific page shows both popups
    url is

    Plugin Support gonzalesc


    In the detail popup, in the rules section, you can specific in what pages you want to the popup appears.

    How will work the random popup in all the pages?


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Random popup’ is closed to new replies.