I am trying to achieve like below.
I have a website that I am building here http://ahsanurrahman.com/myprojects/cms/wp/chris-aa/pr1/
I want to force visitor to login or register using a popup that comes out automatically after 5 minutes or like that and remains forever until they login or register. To achieve this I have done like below
<?php
if ( ( is_single() || is_front_page() || is_page() )
&& !is_page('login') && !is_page('register') && !is_user_logged_in()){
echo'<div class="overlay-bg">
</div>
<div class="overlay-content popup3">
<h1>You must login or Register to view this site.</h1>
</div>';
}
?>
To show that popup I am using java-script that shows after 1 minutes if the user not logedin. But if they refresh the page the popup gone and come after 1 minutes again.
So what I want to do is that I want to show the popup to each visitor after 1 minutes but want to keep that popup remains there until they login or register forever even they refresh it.
Thanks