Title: Open popup script
Last modified: September 1, 2016

---

# Open popup script

 *  Resolved [Joe Bloggs](https://wordpress.org/support/users/joe-bloggs/)
 * (@joe-bloggs)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/open-popup-script/)
 * Hi Daniel,
 * This is a great plugin, very easy to use. I ran into this one issue and I was
   hoping you would be able to help.
 * Basically, I would like add a popup on the WP login page. I set up a popup window,
   added a Contact Form 7 into and it is ready to pop on a button click.
 * It works great on any page of my site, popup opens up and shows my contact form
   just fine, but I can’t get it to pop on the login page.
 * I believe it may be because the login page doesn’t have a header or footer and
   so the script that pops the popup is most probably not loaded, correct?
 * I found this API here: [https://wppopupmaker.com/docs/developer/overview-popup-maker-javascriptjquery-api/](https://wppopupmaker.com/docs/developer/overview-popup-maker-javascriptjquery-api/)
   
   but I’m just a little confused with what exact script should I use on my login
   page to make this work.
 * Would you be able to point me to the right direction and tell me what script 
   should I add onto my login page or if there is any other way to achieve this?
 * Many thanks
 * [https://wordpress.org/plugins/popup-maker/](https://wordpress.org/plugins/popup-maker/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/open-popup-script/#post-7547698)
 * [@joe](https://wordpress.org/support/users/joe/) Bloggs – I will have to do some
   digging into WP core for the login / registration pages. You are correct they
   do not use wp_head/wp_footer so not only do our JS & CSS not load but the popups
   are not renderable there either currently.
 * I will look to see if there is a way to do so, I am assuming there is, but it
   likely involves you hooking our JS / CSS registration to new events on your end.
 *  Thread Starter [Joe Bloggs](https://wordpress.org/support/users/joe-bloggs/)
 * (@joe-bloggs)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/open-popup-script/#post-7547702)
 * That would be a really great help, I really appreciate that.
    Many thanks for
   your time.
 *  Thread Starter [Joe Bloggs](https://wordpress.org/support/users/joe-bloggs/)
 * (@joe-bloggs)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/open-popup-script/#post-7547816)
 * Hi Daniel,
    I’ve been searching around for a solution. I guess I should be able
   to use the `login_footer` or `login_enqueue_scripts` to load the javascript to
   the wp-login page, correct?
 * Your documentation has been very helpful too and I found few lines that could
   possibly work, so would something like this work to get the popup pop on the 
   login page?
 *     ```
       <?php
       add_action( 'login_footer', 'my_custom_popup_scripts', 500 );
       function my_custom_popup_scripts() { ?>
       <script type="text/javascript">
       	(function ($, document, undefined) {
   
       		// this should be the line that triggers the popup
                      <a href="#" onclick="jQuery('#popmake-123').popmake('open')">Sign Up For Our Newsletter!</a>
   
       	}(jQuery, document))
       </script><?php
       }
       ```
   
 * Or would I need to specify the URL to the actual script, something like this 
   in the functions.php?
 * add_action( ‘login_enqueue_scripts’, ‘enqueue_my_script’ );
 *     ```
       function enqueue_my_script( $page ) {
           wp_enqueue_script( 'my-script', 'http://domain.com/path/myjs-file.js', null, null, true );
       }
       ```
   
 * I’m an amateur when it comes to jquery and javascript or even php, so sorry if
   i’m totally wrong here, just trying to find a solution that would work..
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/open-popup-script/#post-7547899)
 * [@joe](https://wordpress.org/support/users/joe/) Bloggs – In this case you need
   to not only load our scripts & css, but also the popups themselves need to be
   loaded. You would need to call the correct functions on the footer of the login
   page that we call on wp_footer.
 * Maybe do a search on our github for wp_head, wp_footer & wp_enqueue_scripts. 
   Whatever you see attached to those points likely needs to be attached to login
   page hooks as well.
 * Hope that helps.
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/open-popup-script/#post-8180173)
 * Closing this ticket due to inactivity. If your still having an issue post here
   and we will continue troubleshooting.
 * Please take a moment to [rate and review the plugin](https://wordpress.org/support/view/plugin-reviews/popup-maker?rate=5#postform)
   and or support.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Open popup script’ is closed to new replies.

 * ![](https://ps.w.org/popup-maker/assets/icon-256x256.gif?rev=3097653)
 * [Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder](https://wordpress.org/plugins/popup-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-maker/reviews/)

## Tags

 * [java](https://wordpress.org/support/topic-tag/java/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 5 replies
 * 2 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/open-popup-script/#post-8180173)
 * Status: resolved