I need to create a custom page for user registration in wordpress.
In addition to the traditional form, is there a way to create a custom page by calling the form ?
I need to create a custom page for user registration in wordpress.
In addition to the traditional form, is there a way to create a custom page by calling the form ?
** It is better to go by the path I mentioned in the answer, modify the login structure of the Wordpress dashboard, it will jeopardize your site and its users in terms of security and with constant updates of the Wordpress, you will have future problems from this modification.
You are sure to create a user registration page using even another table and system of login
and session
and user list, and so on. If you are a programmer by ftp accessing this folder from your site in wp-content/themes/meu-tema/
, you will open page.php and put the following code in this file just below <?php get_header(); ?>
<?php /* Template name: Meu Formulário Personalizado */ ?>
Doing this and saving the file named page_form_customizado.php
for example (do not replace your page.php), when entering the administrative area of Wordpress and clicking create a new page, in the drop-down list of page templates located in the right sidebar, it will be written Meu Formulário Personalizado
that when selected and once the page is published and its content will appear on the site.
From there, you simply do all your manipulations in any programming language accepted by your server and do not conflict with existing code, for example javascript, and view the page that your form and the entire structure it will be running on the front and backend of your site to do what you have determined.
You can also install plugins with or without shortcodes to do what you need within that custom page. Any further questions?
In short:
1 - Access the folder of your active theme via FTP.
2 - Create in folder of active theme page_form_customizado.php
with same content of page.php
3 - Set <?php /* Template name: Meu Formulário Personalizado */ ?>
and save.
4 - Go to the administrative area and activate the custom page.
5 - Inserts content via Wordpress or programming.
Within this new template you use the WP pro's own CRUD API for users:
For example the wp_create_user function, shown below:
If the page needs authentication, you can call other API functions like:
Anyway, since creating the template is just working with the API that can do what you want quietly.
To make it easier, I think it's better to use a plugin. I recommend Theme My Login
Inside the plugin folder, there is a folder called templates, which you can freely modify the code, without having to worry about creating some security flaw in your platform.