• Resolved perla11

    (@perla11)


    Hi, I installed the plugin and I want people to login before viewing the site. So I put up a popup on the homepage saying you must login in order to view the site with a button that leads to a login form. Now I want to set up a cookie that when people press on the login button the popup should close. SO I did that with manual javascript but after clicking on the button and logging in, the popup reappears, can you explain to me what I’m doing wrong? thank you

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @perla11,

    I just inspected your site and saw that you’re using an AutoOpen trigger controlled by a cookie set using Manual JavaScript. While that cookie setting method is available within the plugin, the preferred way of setting a cookie is ‘On Popup Close’. Please refer to the following Popup Maker documentation article on cookies for details. This will simplify the process of setting up trigger & cookie for you going forward.

    https://docs.wppopupmaker.com/article/358-popup-settings-box-cookies-option-settings

    Popup Maker has already developed an ‘out-of-the-box’ solution for people in your situation. You want to require visitors to register on the site before they can access any further content. I presume you will also require those same people to sign back in when they return to the site at a future date. And if a person who registers forgets their password (or uses the wrong one), you’ll need to provide a solution for that use case as well.

    The solution you need is the AJAX Login Modals plugin extension to Popup Maker. This plugin requires a paid, 1-year subscription. The value is that the plugin is performant (the code is solid), is well documented ( I rewrote the documentation myself ), and it entitles you to premium support via the Popup Maker support forum on https:///wppopupmaker.com/support.

    Here are links to the product and documentation index pages.

    https://wppopupmaker.com/extensions/ajax-login-modals/

    https://docs.wppopupmaker.com/category/70-ajax-login-modals

    I hope this helps you to resolve your problem.

    Thread Starter perla11

    (@perla11)

    I created a cookie on popup close but it didn’t help. the popup still reappears..

    Hello @perla11:

    I think my earlier response to you was slightly incorrect. Thinking a little more carefully, I now realize something about how you probably set up the form. At first, I suspect that you used the ‘manual javascript’ cookie setting method so that when a visitor submitted the form, the cookie would be set and prevent the form from showing again. That didn’t work, so you wrote in.

    My error was to tell you to use the ‘On Popup Close’ method to control the popup after the popup form is submitted. But that won’t work either because the cookie must be set following the form submission which relies on an onclick button event (the form submit button).

    Popup Maker does have cookies that specifically integrate with form submission. Those cookies are for forms built with either Contact Form 7, Ninja Forms, or GravityForms. In your case, you are not using any of those WordPress form plugins.

    But the bigger issue is that you want manage visitor access to your site using a login form. The efficient way to do that is to use AJAX (asynchronous javascript and XML). Using the free version of Popup Maker does not involve AJAX. Popup Maker provides a ‘ready-made’ solution that will solve your problem; the AJAX Login Modals plugin extension. Please refer to the product and documentation links in my previous post. You will need to purchase a license in order to install and activate the extension.

    Thread Starter perla11

    (@perla11)

    I know about the plugin but I’m not ready to (rather my client is not ready) pay for that. I’m wondering there must be some code to hide the popup from logged in users, would you know? Also, If I install the AJAX login modal plugin what do I gain by keeping popup maker? In other words what does popup maker + AJAX login modal extension do more?
    Thanks for your assistance.

    Hello @perla11:

    From the AJAX Login Modals plugin product page:

    >AJAX Login Modals (ALM) technology taps into the WordPress User functionality and enables you to create Login, Register & Forgot Your Password Popups without any coding or setup. Simply edit, theme, and call your popup and it’s done!

    Our of the box, you can’t do that with Popup Maker. With the plugin extension to Popup Maker you can.

    >I’m wondering there must be some code to hide the popup from logged in users, would you know?

    ALM uses the WordPress API to determine whether a user is logged in or not. There is another Popup Maker paid extension to detect whether a user is logged in (Advanced Targeting Conditions). But again, that requires a license. It also doesn’t fully address what you’re trying to do.

    >Also, If I install the AJAX login modal plugin what do I gain by keeping popup maker?

    The core Popup Maker plugin must be installed and activated for the ALM extension to work. It is not possible to run ALM without Popup Maker installed.

    >In other words what does popup maker + AJAX login modal extension do more?

    From the ALM product page:

    1) Force User Login – Protect your sites content until users login or register. Combined with Popup Makers targeting conditions, you can lock down one page, the entire site or anywhere in between.

    2) Force Login Actions – If you want to prevent users from adding items to cart, clicking a link or anything else, you can use a login modal to interrupt those actions until they have logged in.

    3) Login / Registration / Password Recovery Modals – You can create one popup that contains all 3 with a great interface for switching between them, or place each in its own separate modal.

    Contact https://wppopupmaker.com/support/ to request access to a free demo site where you test out the ALM extension for yourself before buying.

    • This reply was modified 5 years, 4 months ago by Robert Gadon.
    Thread Starter perla11

    (@perla11)

    Ok, thanks! just wondering how does a popup normally close and not reappear?

    Hello @perla11:

    You wrote:

    >…just wondering how does a popup normally close and not reappear?

    It’s described in the documentation. Here are some useful links to get you started.

    https://docs.wppopupmaker.com/article/350-popup-settings-box-triggers-option-settings

    https://docs.wppopupmaker.com/article/358-popup-settings-box-cookies-option-settings

    And if you haven’t viewed the orientation article for new users of Popup Maker, then read this:

    https://docs.wppopupmaker.com/article/488-create-your-first-popup-summary-guide

    And this article is a useful reference for some of the specialized terms used throughout the documentation:
    https://docs.wppopupmaker.com/article/484-popup-maker-glossary-of-terms

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘can’t get it to work properly’ is closed to new replies.