0

That might be a long shot, but I though I should give it a chance.

I am using WordPress Popup in order to show a popup when a user lands on specific pages on the website. You create a popup and you can exclude it from showing up on specific URLs. I have a Deals website and I don't want the popup to show on cart's page. The problem I'm facing is that the page has a dynamic URL and it looks like this: 'http://domain.com/cart/?add_to_cart=329'

I have tried the following ways to write it down:

  1. http://domain.gr/cart/
  2. http://domain.gr/cart/?add_to_cart=/
  3. http://domain.gr/cart/?add_to_cart=%/
  4. http://domain.gr/cart/?add_to_cart=?/
  5. http://domain.gr/cart/?add_to_cart/

Any ideas on how I can handle this?

Thanks in advance for any help! I'm desperated here! :)

Kat

1 Answer 1

2

Within the javascript file the developer calls a method when the page loads.

jQuery(window).load(po_selectiveLoad);

This methods calls another method.

function po_selectiveLoad() {       
    po_load_popover();
}

If you replace it with this

function po_selectiveLoad() {
        var urlString = new String(window.location.href);
        if (!urlString.match(/\/cart\//)) {
            po_load_popover();
        }
    }

Of course this is not good because you will need to modify the plugin files.

I am not sure if the developer has provided the option of preventing a pop up based on a phrase or word contained within the url, i installed the plugin and did not see an option.

It may be a feature of the plugin the developer will implement at a later date or you can ask. Hope this helps.

1
  • that did it! Thank u! BTW I don't see any option in the plugin to prevent the popup from showing based on a phrase or a word. I guess it would be a good idea to suggest it to the developer. Thank u again for the help!
    – kat_indo
    Commented Jun 18, 2013 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.