I wonder if there is existing tutorial on how to create a popup registration page in wordpress by utilizing function.php? or is there another way that can do with it?

Thank you!

  • What makes this question not a javascript question? Are you asking how to enqueue a script/style? – mor7ifer Mar 11 '13 at 17:34
  • I am having trouble find a way to create a popup area within the same page, not a popup page, so I would consider its to be done in javascript. Do you have any idea about it? Thank you – Adam Mar 11 '13 at 17:39

You can add the HTML for the area via wp_footer, include the style with wp_enqueue_style(), and include the javascript to show/hide the popup with wp_enqueue_script().

wpse90382_popup_function() {
    add_action( 'wp_footer', 'wpse90382_popup_html' );
    wp_enqueue_style( 'your_style', get_template_directory_uri() . 'your_stylesheet.css' );
    wp_enqueue_script( 'your_script', get_template_directory_uri() . 'your_javascript.js' );
wpse90382_popup_html() {
        <div>Your HTML</div>
if ( some condition )
  • sounds deep. I do not have a great coding experience yet, I wonder if there is any existing tutorial express the same method or utilize the similar functions as you stated? If you know, that will be great if you could put the link here, thanks! – Adam Mar 11 '13 at 17:50
  • I don't know of any tutorial that would cover the whole thing, but you can definitely find tutorials on each element individually, which should be sufficient for you to determine how to put everything together. – mor7ifer Mar 11 '13 at 18:15
  • There, threw some real rough code together for you. Note that that's entirely untested and I wrote it directly into the code editor. Also, don't use wp_head, use wp_footer. wp_footer is within the <body> tags. – mor7ifer Mar 11 '13 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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