Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6642155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:53:49+00:00 2026-05-25T23:53:49+00:00

I have a client that needs a custom registration form. I need to make

  • 0

I have a client that needs a custom registration form.

  • I need to make a custom design on this page
  • I need to add custom fields like First Name, Company, Phone, etc.

Someone can help me with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:53:50+00:00Added an answer on May 25, 2026 at 11:53 pm

    A better place to ask WordPress questions is probably on WordPress Answers. Anyhoo, if you want to solve this without plugins, you need three things:

    1. A custom WordPress theme
    2. A Page Template
    3. A WordPress Page that uses the Page Template

    When you have these three parts in place, you can do the following in your Page Template:

    <?php
    /*
    Template Name: Registration
    */
    
    global $current_user;
    wp_get_current_user();
    
    $firstname = $_POST['firstname'];
    $lastname = $_POST['lastname'];
    $company = $_POST['company'];
    
    if (($firstname != '') && ($lastname != '') && ($company != '')) {
        // TODO: Do more rigorous validation on the submitted data
    
        // TODO: Generate a better login (or ask the user for it)
        $login = $firstname . $lastname;
    
        // TODO: Generate a better password (or ask the user for it)
        $password = '123';
    
        // TODO: Ask the user for an e-mail address
        $email = 'test@example.com';
    
        // Create the WordPress User object with the basic required information
        $user_id = wp_create_user($login, $password, $email);
    
        if (!$user_id || is_wp_error($user_id)) {
            // TODO: Display an error message and don't proceed.
        }
        
        $userinfo = array(
            'ID' => $user_id,
            'first_name' => $firstname,
            'last_name' => $lastname,
        );
    
        // Update the WordPress User object with first and last name.
        wp_update_user($userinfo);
    
        // Add the company as user metadata
        update_usermeta($user_id, 'company', $company);
    }
    
    if (is_user_logged_in()) : ?>
    
        <p>You're already logged in and have no need to create a user profile.</p>
        
    <?php else : while (have_posts()) : the_post(); ?>
    
    <div id="page-<?php the_ID(); ?>">
        <h2><?php the_title(); ?></h2>
    
        <div class="content">
            <?php the_content() ?>
        </div>
    
        <form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
            <div class="firstname">
                <label for="firstname">First name:</label>
                <input name="firstname"
                        id="firstname"
                        value="<?php echo esc_attr($firstname) ?>">
            </div>
            <div class="lastname">
                <label for="lastname">Last name:</label>
                <input name="lastname"
                        id="lastname"
                        value="<?php echo esc_attr($lastname) ?>">
                </div>
                <div class="company">
                <label for="company">Company:</label>
                <input name="company"
                        id="company"
                        value="<?php echo esc_attr($company) ?>">
                </div>
        </form>
    </div>
        
    <?php endwhile; endif; ?>
    

    Now, when you want to retrieve the stuff you’ve stored, you need to know whether the information is within the User object itself or in metadata. To retrieve the first and last name (of a logged-in user):

    global $current_user;
    $firstname = $current_user->first_name;
    $lastname = $current_user->last_name;
    

    To retrieve the company name (of a logged-in user):

    global $current_user;
    $company = get_usermeta($current_user->id, 'company');
    

    That’s the basic gist of it. There’s still a lot of stuff missing here, like validation, error message output, the handling of errors occurring within the WordPress API, etc. There’s also some important TODO’s that you have to take care of before the code will even work. The code should probably also be split into several files, but I hope this is enough to get you started.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Django form that needs to do some client-side validation before submitting
We have a custom built program that needs authenticated/encrypted communication between a client and
I have a client that runs a small business. They need a custom database
we're have a client that needs to get interactive messages from a server, from
I have a client app that needs to save a username/password for an SMTP
We have a client application that needs to send messages to a server for
I have a .NET client that needs to connect to a remote SQL Server
I have a .NET client application that needs to communicate with a server using
I have a client server based windows forms application that needs an administrator only
I have a product that I distribute to my clients. Each client needs some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.