• Resolved mcederbergwc

    (@mcederbergwc)


    Hello! We would like the popup to display each time the user visits the site. If the browser window is closed, then re-opened, we’d like the popup to re-appear. How can this be achieved?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor 10Horizons Plugins

    (@tentenbiz)

    Hello,

    A little bit more info would help. Are you going to display the popup site-wide or only on particular pages? Also, are you using (or going to use) shortcode or the incorporated options on the post/page edit screen?

    Plugin Contributor 10Horizons Plugins

    (@tentenbiz)

    If you’re using shortcode, you could just comment out line 118 to 120 in the file terms.php inside the plugin folder.

    In more detail, go to the plugin folder (wp-content/plugins/wp-terms-popup) and open the file named terms.php.

    Look for the following codes:

    if(localStorage.getItem('<?php echo json_encode($ttermspopupagreed); ?>') != 'agreed'){
            localStorage.setItem('<?php echo json_encode($ttermspopupagreed); ?>','agreed');
    }

    and replace it with:

    /* if(localStorage.getItem('<?php echo json_encode($ttermspopupagreed); ?>') != 'agreed'){
            localStorage.setItem('<?php echo json_encode($ttermspopupagreed); ?>','agreed');
    }*/

    That should do the trick. So anytime your user closes the tab or the browser and open it again, the popup will reappear.

    But please remember, with this, the changes will be gone once you update the plugin. So you’d need to comment out the same line again. Or maybe I’ll include this feature in the plugin’s next update. Not a promise though.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Show Popup Each Time User Visits Site?’ is closed to new replies.