Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPress登録でユーザープロフィール欄を追加する方法

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressサイトにユーザーが登録する際に、プロフィール欄を追加したいですか?

ユーザーが自分のソーシャルメディアのプロフィールを送信できるようにしたいかもしれません。あるいは、登録時に会社の電話番号を送信させたいかもしれません。これらはすべて、プロフィールフィールドを追加することで実現できます。

この投稿では、WordPressの登録フォームにユーザープロフィール欄を簡単に追加する方法を紹介します。

Adding additional user profile fields in WordPress registration

なぜWordPressの登録にユーザープロフィール欄を追加するのか?

WordPressサイトの登録フォームにユーザープロフィール欄を追加することで、ユーザーから追加情報を収集することができます。これにより、マーケティングキャンペーンを改善したり、コンテンツをパーソナライズしたり、オーディエンスについてより詳しく知ることができます。

例えば、WordPressサイトに登録する際に、ユーザーに電話番号やソーシャルメディアのプロフィールを提供してもらうことができます。

こうすることで、ユーザーにターゲットを絞ったSMSメッセージを送ったり、ソーシャルメディアのアカウントでWordPressブログを宣伝してもらうことができる。

これらの追加フィールドはすべて、あなたが会員制サイトを運営している場合や、ユーザーにブログの購読者として登録してもらう場合に便利です。また、複数著者のブログで他のライターの連絡先情報を保存したい場合にも役立ちます。

それでは、WordPressでユーザー・プロフィール・フィールドを簡単に追加する方法を見ていきましょう。このチュートリアルでは、2つの方法について説明します。以下のリンクからお好きな方法にジャンプしてください:

方法1:Advanced Custom Fieldsを使用してカスタマイザーのプロフィールフィールドを追加する(推奨)

WordPressでユーザープロフィールのフィールドを追加する最良の方法は、Advanced Custom Fieldsプラグインを使用することです。複数のフィールドから選択し、ニーズに合わせてカスタマイズすることができます。

まず、Advanced Custom Fieldsプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化したら、WordPressの管理サイドバーからACF ” Field Groupsページに移動し、’+ Add Field Group’ボタンをクリックします。

Click the Add Field Group button

フィールドグループの名前を入力する新しいページが表示されます。

これはフィールドグループ全体の名前であり、個々のユーザーのフィールドの名前ではないことに注意してください。

Type field group name

その後、「フィールド」セクションまでスクロールダウンし、ドロップダウンメニューからフィールドタイプを選択する。

例えば、ユーザー登録の際に電話番号を入力してもらいたい場合は、「番号」オプションを設定します。また、ユーザーにソーシャルメディアのプロフィールを提供してもらいたい場合は、「テキスト」オプションを設定します。

Choose a field type from the dropdown menu

それができたら、「フィールド・ラベル」オプションにフィールド名を入力するだけです。例えば、ユーザー登録の前にTwitterのハンドルネームを入力させたい場合は、そのハンドルネームをフィールドに入力します。

プラグインは、ラベル名に従ってフィールド名を自動的に生成します。

Add field name and label

次に、上から「バリデーション」タブに切り替える必要がある。ここから、スイッチを切り替えることで、フィールドを必須にすることができる。こうすることで、ユーザーは追加フィールドを入力せずにWordPressサイトに登録することができなくなります。

その後、カスタムフィールドの文字数制限を設定することもできます。

Toggle the Required switch for the additional field

ここで、上から「プレゼンテーション」タブに切り替える。

そこで、追加ユーザー・プロフィール・フィールドのプレースホルダー・テキスト、指示、ラッパー属性を追加することができます。

Configure the Presentation settings

次に、「設定」セクションまでスクロールダウンし、「ロケーションルール」タブが選択されていることを確認してください。ここから、カスタムフィールドの条件ロジックを設定し、WordPressサイト登録時のみ表示されるようにする必要があります。

これを行うには、画面の左隅にあるドロップダウンメニューから「ユーザーフォーム」オプションを選択します。その後、右隅のドロップダウンメニューから「登録」オプションを選択します。

Add conditional logic for the additional user field

最後に、画面上部の「変更を保存」ボタンをクリックし、設定を保存します。

別のフィールドを追加したい場合は、「+ Add Field」ボタンをクリックすることもできます。

Save the additional field

ユーザー登録ページにアクセスして、追加されたユーザープロフィール・フィールドを表示してください。

デモサイトではこんな感じ。

Preview for additional user profile field

方法2:Profile Extra Fieldsでユーザープロフィールを追加する(簡単&シンプル)

この方法を使えば、WordPressのユーザープロフィールやユーザー登録フォームに素早く簡単に追加フィールドを追加することができます。少し柔軟性に欠けますが、この方法で十分です。

まず、Profile Extra Fieldsプラグインをインストールして有効化する必要があります。この方法が本当に〜してもよいですか?WordPressプラグインのインストール方法についての完全ガイドをご覧ください。

プラグインを有効化したら、登録フォームで使用するユーザープロフィールの追加フィールドを作成しましょう。

ここでは例として電話番号フィールドを作成するが、これらのフィールドはいくつでも追加できる。

まず、WordPressの管理サイドバーからProfile Extra Fields ” Add Newページにアクセスします。ここから、「Name」オプションの隣にフィールド名を入力します。

例えば、ユーザーが電話番号を送信するためのフィールドを作成する場合、フィールド名として「Phone Number」と入力します。

その後、ドロップダウンメニューからフィールドタイプを選択します。ソーシャルメディアのプロフィールフィールドを追加する場合は、「テキストフィールド」オプションを使用できます。

ただし、電話番号のフィールドが必要な場合は、ドロップダウンメニューからそのオプションを選択する必要があります。

Add field name and type

その後、電話番号フィールドのパターンを入力したり、説明を追加することもできます。

次に、「Field Properties」セクションまでスクロールダウンし、このフィールドを表示させたいユーザー権限グループのボックスにチェックを入れます。

例えば、WordPressサイトに登録している投稿者すべてにこのフィールドを表示させたい場合は、このユーザー権限のグループの隣にあるチェックボックスをオンにします。

ユーザー権限グループはいくつでも選択できます。

Configure field properties

その後、フォームにこのフィールドを入力せずにユーザーを登録させたくない場合は、「必須」ボックスをチェックすることもできます。ユーザーフィールドがフォームに表示されるように、’Always Show in User Registration Form’ボックスがチェックされていることを本当に〜してもよいですか?

最後に「変更を保存」ボタンをクリックして、設定を保存します。

Check the box to show the field in user registration form

WordPressダッシュボードで新規登録の設定を変更してください。

WordPressの管理エリアにある設定 ” 一般ページで、会員登録にチェックを入れ、誰でもサイトに登録できるようにしましょう。

次に、初期ロールが追加フィールドを追加した権限グループに設定されていることを本当に〜してもよいですか?その後、「変更を保存」ボタンをクリックして設定を保存します。

Set user default role

この方法で、新規ユーザーのアクセスレベルをコントロールすることができ、このチュートリアルで先に選択したフィールドを登録フォームに表示させることができます。

デモサイトの初期設定の登録フォームはこんな感じでした。

Preview for the user field in registration form

ボーナス:WordPressでカスタマイザーユーザー登録フォームを作ろう

このチュートリアルでは、WordPressの初期設定にユーザープロフィールのフィールドを追加する方法を紹介しました。

しかし、WordPressでカスタマイザーのユーザー登録フォームを作成したい場合は、WPFormsプラグインを使用することで簡単に作成することができます。

ドラッグ&ドロップでユーザー登録フォームをデザインできる最高の WordPress フォームプラグインです。また、Advanced Custom Fields のようなプラグインとシームレスに統合できるので、ユーザープロフィールの追加フィールドを簡単に挿入できます。

Edit user registration form

詳しい手順については、WordPressでカスタマイザー登録フォームを作成する方法のチュートリアルをご覧ください。

このチュートリアルで、WordPress登録でユーザープロフィール欄を追加する方法を学んでいただけたら幸いです。また、カスタマイザーログインページの作成方法についての初心者向けガイドや、コースの作成と販売に最適な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.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

26件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    Thank you for the guide. It’s great to have the option to add things like age and geolocation to the registration form, which interest me about the users. It makes it easier to identify the target audience and tailor the website design or content topics accordingly. Awesome.

    BTW: I know I can find out a lot more in Google Analytics, but I’m still navigating through it. Are you planning to write an article with a detailed description of Google Analytics? If so, I haven’t found it yet.

    • WPBeginner Support says

      We don’t have a guide for Google Analytics at the moment but we would recommend taking a look at MonsterInsights to help with understanding Google’s data :)

      管理者

  3. Othman Deraz says

    I am looking for a free question and answer plugin that can add additional information to the user profile.
    Such as weight, height and preferences.
    Thank you!

  4. Jonathan Kotwicki says

    Need some advice here….how can I export the custom user registration fields into an excel sheet or something like that? I.e. if users say “how they heard about us”, how can I go back and view that information for a large number of users without having to individually go into each user profile?

    Thank you very much for any help!
    -Jon

  5. Gabrielle says

    Hi everyone, i like to build stuff for WP without using external plugins, so i build my own. I sucesfully added social media fields to all users > user profile form.
    But i’ve stuck in adding dropdown menu for country.
    Is there any WooCommerce specialist here?
    There is dropdown functionality inside class-wc-countries.php file, and i’am dying to add the same dropdown menu in registration form and on user profile form.
    Of course this is taken for woocommerce, but how to extract this code to work with WC deactivated ?
    Sorry for my poor English.

  6. RunDEv says

    This is a great plugin!

    However, I’ve probably found a bug.

    I’m using WP 4.1.2 with Cimy User Extra Fields, but uploaded files are not showing up in the user’s profile and fields.
    Note: I can only upload files in the backend of WP.

    Who has the solution? Or is there a better and fully working alternative?

    Thank You!

  7. Antok Prima says

    I have follow all tutorial and prepare data for country, region/province & city. But I don’t how to make it selectable from dropdown list.

    Any sugestion how to solve this?

    Thanks

  8. Anon says

    And how can I check (either with php or js) if certain user matched following option in his profile? (I want to display info regarding of matched on/off option)

  9. Syaifuddin Hamzah says

    I just found this tutorial and it really save me lots of time for my new project. I used Oi Frontend Profile to enable users to update their profile details including the fileds created by Cimy User Extra Fileds (CUEF) on frontend. It works until one of my user complaining that once he click update profile, the fields created by CUEF is gone and not updated. Only default WP fields is updated.

    I looked around and found other developer with the same issue here: https://stackoverflow.com/questions/11874083/wordpress-edit-user-and-cimy-user-extra-fields. He found a way to fix the bug by adding “cimy_uef_” to the front of fields name. I just dont understand what he meant by adding “cimy_uef_” to the front of fileds name. Where/how should I add “cimy_uef_” to fix this? Please help. Thanks.

  10. SaWKaT says

    Yes this plugin is so good and easy to use. But I do not understand how to show an extra-field in a page. Have any short code? Can anyone help me?

    • Editorial Staff says

      Would love to see your review in the WordPress.org repository. Please highlight specific issues and perhaps give pointers, so the plugin author can improve the issues. Simply saying it is worst user friendly plugin ever doesn’t really help anyone :)

      管理者

      • Mike says

        From what I’ve seen the plugin author doesn’t respond well to criticism or help requests…

        The documentation needs a lot of work, but the plugin itself is largely quite functional. In the end I had to come up with a slightly hacky javascript solution to apply a placeholder attribute to fields generated by the plugin, but it did what I needed.

  11. Mike says

    Great article, very helpful! Do you know if it’s possible to add the HTML5 placeholder attribute to text fields generated by this plugin?

  12. Karen F says

    Thanks for the great plugin info. I hope you won”t be recommending Code Canyon / Envato – premium plugins. I’ve just had the nasty experience of purchasing one of their products. Before getting to download it the developer took it down & Envato told me that I had to deal with the developer who never answered my email. Envato does not stand by it’s customers despite collecting 50% of purchase fees! Wow. That was money down the drain.

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。