wordpress 自定义_如何在WordPress中创建自定义用户注册表单

wordpress 自定义

Do you want to create a custom front-end user registration form in WordPress? The default WordPress user registration form shows WordPress branding and does not match your site’s theme. In this article, we will show you how to create a custom user registration form in WordPress.

您是否要在WordPress中创建自定义前端用户注册表单? 默认的WordPress用户注册表单显示WordPress品牌,但与您网站的主题不匹配。 在本文中,我们将向您展示如何在WordPress中创建自定义用户注册表单。

How to Create a Custom User Registration Form in WordPress
为什么要在WordPress中添加自定义用户注册表格 (Why Add a Custom User Registration Form in WordPress)

The default WordPress user registration page shows WordPress branding and logo. It does not match the rest of your WordPress site.

默认的WordPress用户注册页面显示WordPress品牌和徽标。 它与您的WordPress网站的其余部分不匹配。

Creating a custom user registration form allows you to add the registration form on any page of your WordPress site. It helps you deliver a more consistent user experience during the registration process.

创建自定义用户注册表格可让您在WordPress网站的任何页面上添加注册表格。 它可以帮助您在注册过程中提供更一致的用户体验。

A custom user registration form also allows you to redirect users upon registration. You can also display additional user profile fields, combine it with custom front-end login form, and connect it with your email marketing service.

自定义用户注册表单还允许您在注册时重定向用户。 您还可以显示其他用户个人资料字段,将其与自定义前端登录表单结合起来,并将其与您的电子邮件营销服务连接

Having said that, let’s take a look at how to create a custom user registration form in WordPress.

话虽如此,让我们看一下如何在WordPress中创建自定义用户注册表单。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

在WordPress中创建自定义用户注册表单 (Creating a Custom User Registration Form in WordPress)

First thing you need to do is install and activate the WPForms – WordPress forms plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活WPForms – WordPress表单插件 。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

WPForms is the best WordPress contact form plugin that allows you to create all type of forms in WordPress.

WPForms是最好的WordPress联系人表单插件 ,可让您在WordPress中创建所有类型的表单。

You will need at least the Pro plan to get access to their user registration addon.

您至少需要专业版计划才能访问其用户注册插件。

You can use our WPForms coupon: WPB10 to get 10% discount on your purchase of any WPForms plan.

您可以使用我们的WPForms优惠券WPB10来购买任何WPForms计划时获得10%的折扣。

Upon activation, you need to visit WPForms » Settings page to enter your WPForms license key. You can get this key from your account on WPForms website.

激活后,您需要访问WPForms»设置页面以输入WPForms许可证密钥。 您可以从WPForms网站上的帐户中获取此密钥。

Add your WPForms License key

Next, you need to visit WPForms » Addons page. Click on the ‘Install Addon’ button next to ‘User Registration Addon’.

接下来,您需要访问WPForms»Addons页面。 单击“用户注册附件”旁边的“安装附件”按钮。

Install user registration addon

WPForms will now download and install the User Registration Addon. You will need to click on the ‘Activate’ button to start using the addon.

WPForms现在将下载并安装用户注册插件。 您需要单击“激活”按钮以开始使用插件。

Activate user registration addon

You are now ready to create your custom user registration form.

现在,您可以创建您的自定义用户注册表单。

You need to visit WPForms » Add New to launch the WPForms Builder.

您需要访问WPForms»添加新的以启动WPForms Builder。

First, you need to enter a name for your form and then select ‘User Registration Form’ as template.

首先,您需要为表单输入一个名称,然后选择“用户注册表单”作为模板。

Form builder setup

WPForms will now create a simple registration form for you. This sample form will have following WordPress user registration fields added by default.

WPForms现在将为您创建一个简单的注册表格。 默认情况下,此示例表单将具有以下WordPress用户注册字段。

  • Name – First and last name

    名称-名和姓
  • Username

    用户名
  • Email

    电子邮件
  • Password

    密码
  • Short bio

    短生物

You can add more fields from the left panel. You can also drag fields to rearrange their order.

您可以从左侧面板添加更多字段。 您还可以拖动字段以重新排列其顺序。

在自定义用户注册表单中添加自定义字段 (Adding Custom Fields in Your Custom User Registration Form)

WPForms also allows you to connect custom user profile fields to your user registration form.

WPForms还允许您将自定义用户配置文件字段连接到用户注册表单。

To do this, you will need to add additional user profile fields to your WordPress site. The easiest way to do this is by using a plugin.

为此,您需要将其他用户配置文件字段添加到WordPress网站。 最简单的方法是使用插件。

In this example, we are using User Meta Manager plugin. However, the field mapping feature of WPForms works with any plugin that uses standard WordPress custom fields to add and store user meta data.

在此示例中,我们正在使用User Meta Manager插件。 但是,WPForms的字段映射功能可与使用标准WordPress自定义字段添加和存储用户元数据的任何插件一起使用。

First thing you need to do is install and activate the User Meta Manager plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活User Meta Manager插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, you need to visit Users » User Meta Manager page and click on Add Custom Meta button to continue.

激活后,您需要访问Users»User Meta Manager页面,然后单击Add Custom Meta按钮继续。

Adding custom user meta to user profiles in WordPress

First you need to enter a key. This key is how the custom user profile field will be recognized internally.

首先,您需要输入一个密钥。 此项是在内部识别自定义用户配置文件字段的方式。

Next you need to choose a field type. In this example, we are using a URL field to add Facebook profile URL. Under ‘Label’, you need to enter the label that will be visible to users when filling this field.

接下来,您需要选择一个字段类型。 在此示例中,我们使用URL字段添加Facebook个人资料URL。 在“标签”下,您需要输入在填写该字段时用户可见的标签。

Click on the Submit button to add the custom meta field. You can now visit Users » Your Profile page to see the field in action.

单击提交按钮以添加自定义元字段。 现在,您可以访问用户»您的个人资料页面,以查看该字段。

A custom user profile field to add Facebook profile URL

Now that we have created a custom user profile field, let’s add it to the custom user registration form in WPForms and then map it.

现在,我们已经创建了一个自定义用户配置文件字段,让我们将其添加到WPForms中的自定义用户注册表单中,然后进行映射。

You will need to visit WPForms » All Forms page to edit your custom user registration form or create a new one.

您将需要访问WPForms»所有表单页面,以编辑您的自定义用户注册表单或创建一个新表单。

After that click on a field from the left panel to add it to your form. In this example, we are adding a website/URL field to our form.

之后,单击左侧面板中的字段以将其添加到表单中。 在此示例中,我们将网站/ URL字段添加到表单中。

Adding fields

The website / URL field will now appear in your form preview. You need to click on the field and WPForms will show its properties in the left panel.

网站/ URL字段现在将出现在表单预览中。 您需要单击该字段,WPForms将在左侧面板中显示其属性。

We need to change the label from Website/URL to Facebook Profile URL. You can also add a description for the field.

我们需要将标签从“网站/ URL”更改为“ Facebook个人资料URL”。 您也可以为该字段添加描述。

Edit field

Don’t forget to click on the Save button at the top right corner of the screen to save your form.

不要忘记单击屏幕右上角的“保存”按钮以保存表单。

Next, you need to click on the Settings button for advanced form settings and field mapping. On the Settings page, click on the User Registration tab.

接下来,您需要单击“设置”按钮以进行高级表单设置和字段映射。 在“设置”页面上,单击“用户注册”选项卡。

WPForms will now show your form fields and a drop down menu below them to select the WordPress registration field to map it with.

WPForms现在将显示您的表单字段以及它们下方的下拉菜单,以选择WordPress注册字段进行映射。

You will notice that WPForms will automatically map your default fields like Name, Email, Password, etc. You can also select a page where you want users to be redirected to once they submit the form.

您会注意到WPForms将自动映射您的默认字段,例如名称,电子邮件,密码等。您还可以选择一个页面,希望用户在提交表单后将其重定向到该页面。

You will need to scroll down to the ‘Custom User Meta’ section. Here you can enter the custom meta key you created earlier and then select the form field you want to map it with.

您需要向下滚动到“自定义用户元”部分。 在这里,您可以输入您先前创建的自定义元键,然后选择要与其映射的表单字段。

Mapping custom fields

Don’t forget to click on the Save button on the top right corner of the screen to save your settings.

不要忘记单击屏幕右上角的“保存”按钮以保存您的设置。

在WordPress中添加自定义用户注册表单 (Adding Your Custom User Registration form in WordPress)

WPForms makes it super simple to add forms into your WordPress posts, pages, and sidebar widgets.

WPForms使将表单添加到WordPress帖子,页面和侧边栏小部件中变得非常简单。

You need to create a new post/page or edit an existing one. On the post edit screen, you will notice the new WPForms button.

您需要创建一个新的帖子/页面或编辑现有的帖子/页面。 在帖子编辑屏幕上,您会注意到新的WPForms按钮。

Adding a form in WordPress posts or page

Clicking on it will bring up a popup. You need to select your form from the drop down menu and then click on the Add Form button.

点击它会弹出一个弹出窗口。 您需要从下拉菜单中选择表单,然后单击“添加表单”按钮。

You will notice the WPForms shortcode will appear in your post’s content editor. You can now publish or save your post/page and then preview your form.

您会注意到WPForms短代码将出现在帖子的内容编辑器中。 现在,您可以发布或保存您的帖子/页面,然后预览表单。

Previewing custom user registration form

WPForms also allows you to add your custom user registration form in your sidebar. Visit Appearance » Widgets page and add WPForm widget to a sidebar.

WPForms还允许您在边栏中添加自定义用户注册表单。 访问外观»小部件页面,并将WPForm小部件添加到侧边栏。

Add custom user registration form to sidebar in WordPress

You need to select the form you want to show from the drop down menu in the widget settings. Don’t forget to click on the save button to store your widget settings.

您需要从小部件设置的下拉菜单中选择要显示的表单。 不要忘记单击“保存”按钮来存储您的小部件设置。

That’s all, you can now visit your website to see your custom user registration form in action.

就是这样,您现在可以访问您的网站以查看您的自定义用户注册表格。

Custom registration form in sidebar

We hope this article helped you learn how to easily add a custom user registration form in WordPress. You may also want to see our list of 10 WordPress plugins that will quickly help you get more traffic.

我们希望本文能帮助您学习如何轻松地在WordPress中添加自定义用户注册表单。 您可能还想查看我们的10个WordPress插件列表, 这些列表将快速帮助您获得更多流量

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-create-a-custom-user-registration-form-in-wordpress/

wordpress 自定义

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值