Skip to content
pakainfo

Pakainfo

Web Development & Good Online education

  • Home
  • Blog
  • Categories
  • Tools
  • Full Form
  • Guest Post
    • Guest Posting Service
  • Advertise
  • About
  • Contact Us

how to create registration form in wordpress without plugin?

June 10, 2020 Pakainfo wordpress Leave a comment

Question: how to create registration form in wordpress without plugin?Most web developers using WordPress but they do not like to their members or users to registration or login through the WordPress default register(signup)/login page .If you would like to make your custom login and registration page in WordPress any theme also you can use wpforms registration form.

Today I will learn to you how to make a a pop up WordPress custom login(signIn) and register(SignUp) page template without a plugin in WordPress.There are many good benefits to creating a new user custom login and register form on your CMS (Content management system) WordPress website.

how to create registration form in wordpress without plugin	,how to create a form in wordpress without plugin, wordpress registration page template,customize wordpress login page without plugin,custom register form wordpress,custom login page wordpress without plugin
how to make a pop up registration form in wordpress

Create Custom WP Forms

Contents

  • Create Custom WP Forms
  • Create Custom Register Page Template
  • Check if the user is not logged in
  • Create Registration Form
  • PHP Source Code For Validation & Create Account
    • Read
    • Summary
    • Related posts

registration form that includes the bellow fields:

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

Create Custom Register Page Template

Here first of all I am making a new php Based wordpress template file name is a custom-register.php as well as there place it inside your Page navigation: WordPress theme folder https://www.google.com/wp-content/themes/great-theme-name/

wordpress frontend login form code
how to create a registration form

<!--?php /* ** Template Name: Users Custom Register Page */ get_header(); ?-->

Check if the user is not logged in

We must first of all verify or check whether the current active user is logged in or not. I will display the registration(signUp) form only if the active current user is not logged in.

<?php global $wpdb, $user_ID; if (!$user_ID) { //All source code goes in here. } else { wp_redirect( home_url() ); exit; } ?>

Create Registration Form

and then simple wordpress frontend login form code copy paste your source code for create a registration page on this template.

<h3>Create your account</h3>
<form action="" method="post" name="member_registeration"><label>Member <span class="error">*</span></label>
<input class="text" name="membername" required="" type="text" placeholder="Enter Your Member" />
<label>Member Email address <span class="error">*</span></label>
<input class="text" name="memberemail" required="" type="text" placeholder="Enter Your Email" />
<label>Member Password <span class="error">*</span></label>
<input class="text" name="password" required="" type="password" placeholder="Enter Your password" />
<input name="member_registeration" type="submit" value="SignUp" /></form><!--?php if(isset($registrationErrMessage)){echo '</p>
<div>'.$registrationErrMessage.'</div>
<p>';}?-->

PHP Source Code For Validation & Create Account

Now, You can submit and save your form with Full Validation following the source code.

Also Read This 👉   Reading Contents From PDF File In C#

<!--?php if (isset($_POST['member_registeration'])) { //registration_validation($_POST['membername'], $_POST['memberemail']); global $reg_errors; $reg_errors = new WP_Error; $membername=$_POST['membername']; $memberemail=$_POST['memberemail']; $password=$_POST['password']; if(empty( $membername ) || empty( $memberemail ) || empty($password)) { $reg_errors->add('field', 'Required form field is missing');<br ?--> }
if ( 6 > strlen( $membername ) )
{
$reg_errors->add('username_length', 'Member Name too short. At least 6 characters is required' );
}
if ( username_exists( $membername ) )
{
$reg_errors->add('user_name', 'The membername you entered already exists!');
}
if ( ! validate_username( $membername ) )
{
$reg_errors->add( 'username_invalid', 'The membername you entered is not valid!' );
}
if ( !is_email( $memberemail ) )
{
$reg_errors->add( 'email_invalid', 'Member Email id is not valid!' );
}

if ( email_exists( $memberemail ) )
{
$reg_errors->add( 'email', 'Member Email Already exist!' );
}
if ( 6 > strlen( $password ) ) {
$reg_errors->add( 'password', 'Member Password length must be greater than 6!' );
}

if (is_wp_error( $reg_errors ))
{
foreach ( $reg_errors->get_error_messages() as $error )
{
$registrationErrMessage='
<p style="color: #ff0000; text-aling: left;"><strong>ERROR</strong>: '.$error . '</p>
';
}
}

if ( 1 > count( $reg_errors->get_error_messages() ) )
{
//simple sanitize member form input
global $membername, $memberemail;
$membername = sanitize_user( $_POST['membername'] );
$memberemail = sanitize_email( $_POST['memberemail'] );
$password = esc_attr( $_POST['password'] );

$memberdata = array(
'user_login' => $membername,
'user_email' => $memberemail,
'user_pass' => $password,
);
$member = wp_insert_user( $memberdata );
}

}
?>

Web Programming Tutorials Example with Demo

Read :

  • Jobs
  • Make Money
  • Programming

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about create registration form in WordPress without plugin.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Related posts:

  1. Create a Registration and Login System with PHP and MySQL
  2. Responsive Registration Form in HTML and CSS Source Code [ 8+ elements ]
  3. how to create custom post type in wordpress without plugin?
  4. WordPress Next Previous Article/post using CSS
  5. How to Add Captcha in PHP Registration Form?
  6. registration and signin form in php and mysql with validation
  7. How To Create Image Hover Overlay Effects?
  8. how to create plugin in wordpress with example
create a registration pagehow to create a registration formhow to create form in wordpresshow to make a pop up registration form in wordpressnew user registration wordpressPage Navigationwordpress frontend login form codewpforms registration form

Post navigation

Previous Post:khan academy mappers
Next Post:tfl journey planner 2020 | tfl plan a journey | aa route planner

Advertise With Us

Increase visibility and sales with advertising. Let us promote you online.
Click Here

Write For Us

We’re accepting well-written informative guest posts and this is a great opportunity to collaborate.
Submit a guest post to [email protected]
Contact Us

Freelance web developer

Do you want to build a modern, lightweight, responsive website quickly?
Need a Website Or Web Application Contact : [email protected]
Note: Paid Service
Contact Me

Categories

3movierulz (64) Ajax (464) AngularJS (377) ASP.NET (61) Bio (109) Bollywood (108) Codeigniter (175) CSS (98) Earn Money (93) Education (63) Entertainment (130) fullform (87) Google Adsense (64) Highcharts (77) History (40) Hollywood (109) JavaScript (1359) Jobs (42) jQuery (1423) Laravel (1088) LifeStyle (53) movierulz4 (63) Mysql (1035) Mysqli (894) php (2133) Programming (2345) Python (99) Software (178) Software (90) Stories (98) tamilrockers (104) Tamilrockers kannada (64) Tamilrockers telugu (61) Tech (147) Technology (2416) Tips and Tricks (130) Tools (214) Top10 (507) Trading (95) Trending (77) VueJs (250) Web Technology (113) webtools (200) wordpress (166) World (343)

A To Z Full Forms

Access a complete full forms list with the meaning, definition, and example of the acronym or abbreviation.
Click Here
  • Home
  • About Us
  • Terms And Conditions
  • Write For Us
  • Advertise
  • Contact Us
  • Youtube Tag Extractor
  • Info Grepper
  • Guest Posting Sites
  • Increase Domain Authority
  • Social Media Marketing
  • Freelance web developer
  • Tools
Pakainfo 9-OLD, Ganesh Sco, Kothariya Ring Road, Chokadi, Rajkot - 360002 India
E-mail : [email protected]
Pakainfo

© 2023 Pakainfo. All rights reserved.

Top
Subscribe On YouTube : Download Source Code
We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype Guest Posting Sites