PopUp Pro Not working with Thesis Theme

Hi there, I'm writing on behalf of my client, for whom I'm developing her new site.

We want to use PopUp Pro to advertise her new membership system. I love the plugin and we have developed a popup that we're very happy with. However, it won't load on our site as-is. I tested disabling plugins and themes, and found that the Thesis theme we're using as a framework (which is fundamental) is what causes it to stop working. Using a default theme like Twenty Fifteen works fine, even with all other plugins active.

I would prefer to get this plugin working rather than spend the time of finding another such plugin with all the features we need. So I'm hoping you can help me identify the source of the incompatibility between the plugin and the theme. I've tried changing the PopUp deployment settings (Page Footer, WP Ajax etc.) but there was no change. The Page Footer option does not appear to be compatible with Thesis from what I can see on the page, so I think it's just not getting added to the header or footer. I'm wondering also if you can send me just that code (scripts for Page Footer call of PopUp without AJAX) so I can try manually adding it to the theme, only on the page we want to use this plugin on. I'm also open to any other ideas you have.

Thanks very much for your time.
Rory

  • Michael Bissett

    Hey @cheftinajo, hope you're doing well today! :slight_smile:

    If you'd like to try using the Custom AJAX method, you can try using this script on your page:

    <script type="text/javascript">
    var force_popover = 1;
    </script>

    Or, if you'd rather dig into the code that PopUp Pro uses to load the popup on the Page Footer method, you can check out lines 213-244 of:

    /popover/inc/class-popup-public.php

    You'll notice that there's this code there:

    add_action(
    			'wp_footer',
    			array( $this, 'show_footer')
    		);

    You'd want to be sure to set up a similar action call inside of your theme. :slight_smile:

    Hope this helps!

    Kind Regards,
    Michael

    P.S. I'd advise updating PopUp Pro first before delving into the code, I noticed that you're a version behind presently. :slight_smile:

  • cheftinajo

    Hi Michael,

    Thanks for your reply!

    I've updated the plugin, and added the Custom AJAX script to the head of the home page (and set the PopUp settings to Custom AJAX). I can confirm it's there by viewing the source, however the popup still doesn't appear. Switching it to 2015 theme, the popup does appear.

    I also selected the Page Footer method again, after updating the plugin. Now it says Okay: Your current theme uses wp_head(); and wp_footer(); correctly! However the popup still does not load. I also tried adding the relevant section of code from the plugin files to the theme functions, but that didn't work either.

    Can you help me determine what compatibility issues could exist between the popup plugin and theme?

    Thanks,
    Rory

  • Michael Bissett

    Hey @cheftinajo,

    I'd say that this is going to require a deeper look at your theme's code here, could you please send in the following via our contact form:

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    On the contact form (linked to below), please select "I have a different question", this ensures it comes through and gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thanks a bunch! :slight_smile:

    Kind Regards,
    Michael

  • Michael Bissett

    Hey @cheftinajo,

    I've tried my best to look into this, and so far, I'm partially able to get the popup working by doing the following:

    - Removing the scripts inside of the "Tracking Scripts" section inside your theme (one of which was loading another version of jQuery, loading 2 versions on the same page rarely results in good behavior)
    - Changing the popup settings to display the popup immediately (instead of the 2 second delay), remove the closing animation & the custom colors (the last one being done for good measure, I doubt the colors would have a effect here)

    However, I'm not seeing the content that I should be, it looks like I'm seeing the content for a product instead inside the popup? Also, given the delay that I'm seeing in using your site in general, I do have to wonder if perhaps part of the problem might not be hosting related (as I'd sometimes get a "Operation timed out after 5000 milliseconds" error when saving settings).

    However, this seems to require more advanced troubleshooting here, and as such, I've called in our second level support staff on this one, so that they can provide their expertise here in debugging this matter. :slight_smile:

    Kind Regards,
    Michael

  • Hoang Ngo

    Hi Rory,

    I hope you are well today and I do apologise for the long delay.

    I tried to reproduce this issue on my end, but it still working fine with the Thesis theme I downloaded from your site. Maybe that because the config is not same. I will need your database for clone your site, this way will easier for me to debug. Can you please send in:

    - Mark to my attention - ATTN: Hoang Ngo
    - Link back to this thread
    - Include cPanel (I will need to look at the DB so need PHPMyAdmin or similar)
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    I will put this ticket as priority for now, so we will resolve your issue ASAP.

    I'm sorry for this inconvenience and many thanks for your patience.

    Best regards,
    Hoang

  • Hoang Ngo

    Hi @cheftinajo,

    I hope you are well today.

    I have fixed that, the reason is because of this code block on your /wp-content/thesis/skins/classic-r/custom.php

    function pop()
    {
        if (is_front_page()) { ?>
    
            <script type="text/javascript">
                var force_popover = 1;
            </script>
    
        <?php }
    }
    
    add_action('wp_head', 'pop');

    This will make the popover not only queries wrong popup, but also make the css can't apply to the popover container. I removed that hook from the queue, and it should work fine now :slight_smile:

    If you have any issues please don't hesitate to let us know so we can assist.

    Best regards,
    Hoang