• Resolved mario.scalabrino

    (@marioscalabrino)


    Hello,

    very nice plugin, congratulations.

    I was testing it and I noticed that it is not showing up if I load a custom template page attribute (no parent or choosing a parent, doesn’t change).

    If I switch the same page to “Default template” then it shows up as designed.

    Should I add something to my custom template to make it work?

    Thank you in advance

    https://www.ads-software.com/plugins/i-agree-popups/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Talisman

    (@talismansolutions)

    Hi there,

    Thanks for your feedback, glad you’re enjoying the plugin!

    In order for the popup to display, the templates you’re using in your theme must utilise the wp_footer() function, as this is where the HTML and JS for your popup will be inserted.

    We’ve just tested the plugin with a custom page template and all is working as it should, so please check your template to make sure wp_footer() is included (either in footer.php or the template itself if you’re not using get_footer()). If it’s there already and you’re still having trouble, please let us know and we can investigate this issue further.

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    Hello,

    thank you for you fast response.

    I’ve included get_header() and get_footer() before and after the php/js/html page template as you can see below. Now it seem to work with this two included.

    I don’t know why it works only if I also include the get_header().
    If I only add at the end get_footer it doesn’t work.

    Any help on this? Maybe with some code example, I’m not so expert as I would like.

    <?php
    /*
    Template Name: testproto03
    */
    get_header();
    ?>
    <!DOCTYPE html>
    <html>
    ……..
    </html>
    <?php
    get_footer();

    Thank you in advance

    Plugin Author Talisman

    (@talismansolutions)

    get_header() and get_footer() are functions used to pull your theme’s header.php and footer.php files into your templates. This makes it easier to maintain the header and footer content across multiple templates, instead of editing each one whenever you wish to make a change.

    wp_head() and wp_footer() are action hooks/functions that let WordPress (and WordPress plugins) dynamically insert code into your theme. These functions will usually be included in your theme’s header.php and footer.php, respectively.

    I Agree! Popups makes use of both wp_head and wp_footer (I forgot to mention wp_head in my original reply so apologies for that). The plugin’s stylesheet is inserted into wp_head, and the HTML and JavaScript are inserted into wp_footer, so both will need to be utilised in order for your popups to display. This is why in your case, get_header and get_footer both need to be included in your templates.

    I hope this makes sense and offers an explanation! Please let me know if you need any further assistance.

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    That’s great!

    Thank you for the explanation and the efficiency, it is all clear now and it works!

    This topic is resolved

    Thread Starter mario.scalabrino

    (@marioscalabrino)

    Resolved

    Plugin Author Talisman

    (@talismansolutions)

    You’re very welcome! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not showing the popup with custom template page attribute’ is closed to new replies.