Pippins Plugins
  • Email
  • Facebook
  • Feedburner
  • Github
  • Google
  • Twitter
  • Vimeo
  • Youtube
  • Rss
  • About
  • News
  • Join the Site
    • Member Benefits
    • Member Plugins
    • Email Notifications
  • Plugin Store
    • Affiliate Area
    • Checkout
  • Plugins
    • Plugin Portfolio
      • Plugin Portfolio – List View
    • Free
    • Premium
    • Member Plugins
    • Coding Standards
    • Get Plugin Support
  • Tutorials
    • Series
      • Plugin Development 101
      • Creating a User Follow System Plugin
      • Customizing Restrict Content Pro
      • Displaying Content with Easy Content Types
      • Writing Your First WordPress Plugins, Basic to Advanced
      • Working with Widgets
      • User Submitted Image Galleries
      • Plugin Thoughts
      • Integrating Stripe.com with WordPress
      • WordPress Rewrite API
    • Member Exclusive
      • Free Members
      • Subscriber Only
    • Difficulty
      • Beginner
      • Intermediate
      • Advanced
    • Action and Filter Hooks
    • Ajax
    • Custom Post Types
    • External APIs
    • Short Codes
    • Taxonomies
    • Video Tutorials
    • Widget Tutorials
    • WordPress Admin / Dashboard
    • Working with jQuery
    • WordPress Database
    • Writing Plugins
    • Tag Index
  • Reviews
  • Support Forum
  • Contact
    • Support the Site
    • Request Code Review
    • Plugin Support

Creating Custom Front End Registration and Login Forms for WordPress

Posted on December 1, 2011 by Pippin in Advanced, Free Members, Member Restricted, Tutorials, Working with Users, Writing Plugins 71 Comments
Home» Tutorials » Advanced » Creating Custom Front End Registration and Login Forms for WordPress
Tweet
Love It - 8

Front end registration and login forms (meaning placed within your site’s pages, and not the default wp-login.php) are one of the elements that really take a site out of the “standard WordPress” zone. With forms that allow your users to signup and login without ever leaving your main site, you provide a much more consistent and comfortable environment. They can provide that next level of integration that really makes your site zing. They also provide you (the developer/designer) a much higher level of control, especially in regards to styling and functionality. So it’s time to learn how to create them from scratch.


Check out the plugin I’ve released that was inspired by this tutorial.

This is one of the most advanced, and in depth, tutorials that has yet to be written on this site. I’m going to walk you through creating the plugin one function at a time. If you’re not familiar with how to write plugins yet, I highly advise that you go through my Writing Your First WordPress Plugin series.

The finished plugin that you will create with this tutorial will provide two short codes: one that displays a a regular login form, and one that shows a registration form that includes the following fields:

  • Username
  • Email
  • First Name
  • Last Name
  • Password

Both forms will be fully equipped with error messages that alert the user of problems with their registration or login attempts.

If you are a registered member, you will have access to download the complete plugin at the bottom of the page. The plugin I have put together for this tutorial is minimal in features and styling, as it is used primarily as an example, but there will be a full-featured version of this plugin released some time in the coming weeks.

Enough chatter, on to the good stuff!

You must be logged in to view the rest of this content. Register or login from the sidebar.

Tweet Follow @pippinsplugins
forms, login, registration, short code

71 comments on “Creating Custom Front End Registration and Login Forms for WordPress”

Comment navigation

← Older Comments
  1. johnlanglois says:
    December 12, 2012 at 1:11 pm

    Pippin,
    I am getting the following message from debug.
    Notice: registration.php is deprecated since version 3.1 with no alternative available. This file no longer needs to be included. in E:\xampp\htdocs\www.ardentwriterpress.com\wp-includes\functions.php on line 2680 Notice: Undefined index: feralf_login_nonce in E:\xampp\htdocs\www.ardentwriterpress.com\wp-content\plugins\front-end-registration-login-forms\includes\handle-register-and-login.php on line 85.
    A glance in the file shows
    “// this is required for username checks
    require_once(ABSPATH . WPINC . ‘/registration.php’);”

    Did I download the wrong file?
    Thanks.

    Reply
    • Pippin says:
      December 12, 2012 at 7:32 pm

      I just pushed out v1.0.3 of the plugin. Is that the version you’re using?

    • johnlanglois says:
      December 12, 2012 at 8:15 pm

      I don’t think so. I have a paid subscription and downloaded the only file I could find.
      shows “Plugin Name: Front End Registration and Login Forms
      Plugin URI: http://pippinsplugins.com/front-end-registration-and-login-forms-plugins
      Description: Provides simple front end registration and login forms
      Version: 1.1
      Author: Pippin Williamson
      Author URI: http://pippinsplugins.com

      Where should I download the most up to date version?
      Thanks.

    • Pippin says:
      December 13, 2012 at 7:19 pm

      From this page: http://pippinsplugins.com/front-end-registration-and-login-forms-plugins/

  2. jojalamic says:
    February 19, 2013 at 1:45 pm

    Hello,
    Pippin can you tell me how to separete error message? When you hit login or register error message appears on bouth forms.

    Reply
    • Pippin says:
      February 20, 2013 at 5:51 pm

      You need to add a third parameter to the add_error() function that identifies where the error came from, then in the get_errors() function, you need to check and make sure you only display errors from that context.

      Make sense at all?

  3. jojalamic says:
    February 21, 2013 at 1:52 pm

    I don’t know how to do it. If it’s not too much trouble could you post the edited code?

    Reply
    • Pippin says:
      March 4, 2013 at 8:25 pm

      Sorry for being really slow. Here’s an example: https://gist.github.com/pippinsplugins/e56cf9586b263e46a7f1

  4. Jason Alvis says:
    April 22, 2013 at 3:17 am

    Hi Pippin, I’ve noticed the download plugin button returns a 404 error. Have the files been moved to a different location?

    Thanks, Jason

    Reply
    • Pippin says:
      April 22, 2013 at 5:31 pm

      It should work now.

  5. tommysvr says:
    June 13, 2013 at 6:32 am

    Hi Pippin,

    I’m looking to add a Remember Me checkbox to the login form. Would you be able to point me in the right direction to do that? Thanks!

    Reply
    • Pippin says:
      June 18, 2013 at 9:28 pm

      Take a look at how the default WP login forms work and mimic that.

Comment navigation

← Older Comments

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Login

Lost your password?

Please enter your username or e-mail address. You will receive a new password via e-mail.

  • Facebook Become a Fan Like

  • Twitter Subscribe on Twitter Follow

  • YouTube Follow my Videos Subscribe

  • RSS Feed Subscribe with RSS Subscribe

Easy Digital Downloads

Most Loved

  • Love It Pro for WordPress
  • Write a “Love It” Plugin with Ajax to Let Users Love Their Favorite Posts / Pages
  • Simple Notices Pro Plugin for WordPress
  • User Bookmarks for WordPress
  • Front End Registration and Login Forms Plugin

Similar Plugins and Posts

  • Introduction to Using Nonces for Form Validation
  • Front End Registration and Login Forms Plugin
  • Change Password Form Short Code
  • Redirect to Custom Login Page on Failed Login
  • WordPress Login Form Short Code

Latest Premium Content

  • Plugin Development 101 – Introduction to Adding Dashboard Menus
  • Plugin Development 101 – Intro to Loading Scripts and Styles
  • User Follow System – Part 5
  • Plugin Development 101 – Intro to Short Codes

Latest Tutorials

  • Storing Session Data in WordPress without $_SESSION (19)

    The term Session in web development refers to...

  • Test Your Plugins with RTL (1)

    Right-To-Left languages are those that...

  • Submitting Your First Pull Request to a WordPress Plugin on Github (5)

    Github is an extremely popular tool for managing WordPress plugins, and one...

Enter your email to receive automated updates when new posts are published

WP Core Contributions

  • [24316]

View the ticket on Trac.

WP Codex Contributions

  • Function: shortcode exists
  • Function: has shortcode
  • Function: shortcode exists
  • Function: shortcode exists
  • Function: has shortcode

View all 41 changes in the Codex.

Latest Tweets

  • Could not fetch Twitter RSS feed.

Topics

wp_enqueue_script contextual help shortcodes meta box Tom McFarlin register_setting featured attachments get_user_meta Sugar Event Calendar add_options_page hook campaign monitor attachment image forms short codes plugin Related posts login do_action authors mail chimp apply_filters comments recent posts post types short code bbpress taxonomies custom post type gallery Ajax images Stripe taxonomy jquery widgets users add_filter easy content types add_action widget restrict content pro easy digital downloads

Weekly Newsletter

Useful Links

  • Join the Site
  • Plugin Store
  • Affiliate Area
  • Tag Index
  • Support the Site
  • Suggest a Tutorial
  • Random Post
  • Contact

Monthly Archives

(c) 2013 Pippin's Plugins