WordPress popup login form

 In Functions, WordPress Theme Development

Why Create a WordPress Login Popup?

If we are running an online store, membership website, or any other website that needs users to login,  a quick access to their admin area it is essential.

Normally, when users click on the login link (see video below), the popup modal will show with the login form.

A modal login popup enables you to display the login form without sending users to a different page. Once logged in, you can redirect users to any page you want.



Step 1 

Create javascript file  add the code below (gist: ajas-login-script.js) and enqueue the script into your wordpress theme.

Step 2

Create a function in your theme’s functions.php with the code below (gist: functions.php).

Step 3 

Display the login URL/Icon when the user is logged in. Add the code below (gist: header.php) to your header.php .

Recent Posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Start typing and press Enter to search

Let's work together

I'd love to work with you! Please fill out my project form to tell me more about your project/work. I reply to all enquiries within 48 hours.


  • September - Limited
  • October - Available
  • November - Available


  • My day rate is £250.
  • I can provide a fixed price for your work.

Header Enquiry Form

  • This form collects your name, email address and telephone number so that I can respond to the enquiry(ies) that you submit via this website. Please check my privacy policy for the full story on how I use, protect and manage your submitted data.