{"id":69604,"date":"2012-01-19T10:00:06","date_gmt":"2012-01-19T15:00:06","guid":{"rendered":"http:\/\/wpmu.org\/?p=69604"},"modified":"2013-04-15T16:06:36","modified_gmt":"2013-04-15T20:06:36","slug":"how-to-create-multiple-user-account-types-for-buddypress","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/how-to-create-multiple-user-account-types-for-buddypress\/","title":{"rendered":"How to Create Multiple User Account Types for BuddyPress"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-69616\" title=\"users\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/01\/users1.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"128\" height=\"128\" \/>Not every user is the same! The reasons people become members of social networks are as varied as the members themselves. Users interact with your site in different ways and it&#8217;s important to be able to categorize them.<\/p>\n<p>Multiple user types can expand the types of social networks that you are able to build with BuddyPress. In this tutorial we&#8217;ll cover how to build multiple user account types into your registration process.<\/p>\n<h3>1. Install and activate the Buddypress User Account Types plugin.<\/h3>\n<p><a title=\"BuddyPress User Account Types\" href=\"http:\/\/wordpress.org\/extend\/plugins\/buddypress-user-account-type-lite\/\" rel=\"noopener\" target=\"_blank\">Buddypress User Account Types<\/a> is a plugin that I had been wishing for a couple of years ago and was really excited to see it hit the repository. It gives you the capability to create multiple user types and user directories for each.<\/p>\n<h3>2. Configure Account Types<\/h3>\n<p>Once the plugin is installed, you&#8217;ll need to create a new profile field for your user types. Go to <b>Dashboard &gt;&gt; BuddyPress &gt;&gt; Profile Fields<\/b>. Create a new required profile item with a drop down select box.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-69609\" title=\"select-box\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/01\/select-box.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"439\" height=\"432\" \/><\/p>\n<h3>3. Assign the field for the account type in the plugin&#8217;s settings.<\/h3>\n<p>The next step is to go to <b>BuddyPress &gt;&gt; User Account Type<\/b> and assign the field you created for the account type drop down.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-69612\" title=\"bp-user-acount-type-settings\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/01\/bp-user-acount-type-settings.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"671\" height=\"317\" \/><\/p>\n<p>Once you set the account type field, you&#8217;ll be presented with the shortcodes for creating the different user directories. Here&#8217;s an example:<\/p>\n<p>[bp_user_account_type type=&#8221;Staff&#8221;] , [bp_user_account_type type=&#8221;Student&#8221;] , [bp_user_account_type type=&#8221;Teacher&#8221;]<\/p>\n<p>You&#8217;ll need these shortcodes for the next step.<\/p>\n<h3>4. Create the user directories.<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-69617\" title=\"users_folder\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/01\/users_folder.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"128\" height=\"128\" \/>If you want to create a directory for a specific user type, simply paste the shortcode into a new page. You may need to do a little CSS adjusting to your theme to make it fit in, but it should look something like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-69624\" title=\"students\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/01\/students.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"661\" height=\"284\" \/><\/p>\n<p>That&#8217;s all there is to it! As you can see the plugin does most of the work. If you find creative ways to extend this, please let us know in the comments. This plugin is an exciting new tool for communities that were previously limited by having only one user type.<\/p>\n<p>I was inspired by a tweet I saw last night from BuddyPress core developer John James Jacoby:<\/p>\n<p>https:\/\/twitter.com\/#!\/JohnJamesJacoby\/status\/159833022554845184<\/p>\n<p>The <a href=\"http:\/\/wordpress.org\/extend\/plugins\/buddypress-user-account-type-lite\/\" rel=\"noopener\" target=\"_blank\">BuddyPress User Account Type<\/a> plugin is one tool that makes it possible to build these niche social networks. BuddyPress has a bright future ahead in 2012 and a lot of exciting enhancements are going to be coming down the pipe.<\/p>\n<p>Even if you&#8217;re not using this plugin on a site right now, it&#8217;s helpful to know that it&#8217;s possible to quickly create multiple account types. You may want to bookmark this page for the future. Make sure you&#8217;re <a href=\"http:\/\/feeds.feedburner.com\/Wpmu-Wordpress-Mu-PluginsThemesAndNews\" rel=\"noopener\" target=\"_blank\">subscribed<\/a> to our blog for all the latest updates on new and useful BuddyPress plugins.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not every user is the same! The reasons people become members of social networks are as varied as the members themselves. Users interact with your site in different ways and it&#8217;s important to be able to categorize them. Multiple user types can expand the types of social networks that you are able to build with [&hellip;]<\/p>\n","protected":false},"author":4099,"featured_media":69630,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[235],"tags":[300],"tutorials_categories":[],"class_list":["post-69604","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-misc","tag-users"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/69604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/4099"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=69604"}],"version-history":[{"count":1,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/69604\/revisions"}],"predecessor-version":[{"id":215816,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/69604\/revisions\/215816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/69630"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=69604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=69604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=69604"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=69604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}