Hi.
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 “tusite.com/test_page”
After you must put this code in your functions.php
<?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);
unset($spu_matches);
$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”.
Regards
Thread Starter
dyrer
(@dyrer)
I want to have random popup for all pages not a specific.
But even with a specific page shows both popups
url is http://europelcs.com
Hi.
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?
Regards