• Resolved G-Olly

    (@g-olly)


    Is there a way to remove the pum-styles when they are not needed? I only have the pop-up appear when the user first visits the home page after that there should be no need to include a style sheet for the pop-up theme on any other page or post.

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • @g-olly

    First, update to Popup Maker 1.5. Navigate to Popup Maker > Settings. It should open in the Assets tab by default – there you can disable/edit the Popup Maker Style Sheets.

    Hope that helps! If you’re enjoying our product, please do take a moment to click that our plugin Works and to rate and review the plugin to spread the love! <3

    Plugin Author Daniel Iser

    (@danieliser)

    @g-olly – That assumes that the popup is not going to load after that. In fact it does. We use cookies to prevent popups from triggering, but we check them in JavaScript because PHP is unreliable in todays world of hosting with heavy caching.

    To clarify if we checked if a popup should load in PHP on page load and your server used caching this is what would happen:

    First person that loads the page gets the popup, but the server caches that page, since the popup and all JS & styles are there the popup will be there again on all page loads by other users too, this includes the user that already got the popup, and since we wouldn’t be preventing it with JavaScript at that point every page load would trigger the popup, or if the cached copy didn’t include the popup then no page would.

    Instead we load it all the time, and use JavaScript on the browser/client side which checks the cookie at the immediate moment the popup is supposed to trigger.

    Those styles will not load however if you don’t have any popups on the page, but since you have one that should trigger first visit for every user that popup will be there even on the second page load causing those styles to continue to render.

    Hope that helps. If I missed something let me know.

    PS v1.5 just released today and it includes options to both disable those styles entirely as well as to easily copy their contents to your own theme stylesheet. This would negate the issue all together.

    Thread Starter G-Olly

    (@g-olly)

    Hi @danieliser, thanks for clearing that up, that makes complete sense. If I had thought about it a bit more I may have figured that out. I could have just added the pum style sheet to my themes in the first place but I think that having this option in the plugin will be a great help. Thanks once again for your support. It always amazes me how thorough you guys are when it comes to explainations and feed back. ??

    Plugin Author Daniel Iser

    (@danieliser)

    @g-olly – Much appreciated. If you haven’t already be sure to please take a moment to click that it Works and to rate and review the plugin or support.

    That said in depth explanations serve multiple purposes, hopefully you don’t have to come back with 20 more questions ;), others will inevitably find it via google, we point them there some times, or better yet we convert the info into a doc to point users to in the future :).

    Its worth the effort.

    Hello @danieliser,

    One question related with this issue. I’m trying to add those styles to my theme stylesheet but the problem I found is css are related to Custom Post Type “popup” ID like:

    .pum-theme-92634 (on one site)
    .pum-theme-178593 (on another site)

    I’m currently using the same theme for many sites. How can I do that?

    Regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove popup style sheet when not needed?’ is closed to new replies.