Creating Social Business advanced membership site Buddypress and S2member on Rehub theme

There are many ways to use WordPress nowdays. Today, I will show you several examples how to get most powerful features of Buddypress and WordPress to create interesting social oriented Directory or Multi vendor site, deal community.

If you are building Membership for Multi vendor sites, please, use membership addons of vendor plugins. S2member and member types of Buddypress are not compatible with vendor plugins

When you check most popular directory themes, you will see that they offer simple strategy when each user creates own business page and add “listings” to this page. In most cases, theme inits own custom post type, so each business page will be as separate post.

If you check most popular community theme, you will see that they are made with help of Buddypress. User becomes Buddypress user and he get own profile page after registration. The same thing if you check multi vendor themes. Each user can friend with other, send private message, make activity page, etc

But what if we want to get all the best from both ways. For example, what if we want to add all user social features to Business model.  I am ready to show how to do this. For this tutorial you need Rehub theme to get all in one ready sollution or you can use some tips from this article.

To start this tutorial, you must have enabled WordPress and Buddypress + enabled Profile fields extension of Buddypress in Settings – Buddypress


I think, this is most confusing part for settings. Because there are several strategies for user membership. I will try to show some most popular.

Free registration, no payment, no member types.

This is most easy way and it’s default for wordpress. Just enable registration in Settings – general.

For Rehub theme, you can use our ajax login/register popup. To enable this popup, Go to theme option – user option and enable there Login modal. You can enable also login links or buttons in header. More information here

Free registration and membership, but different member types with different profile fields

This can be useful if you want to create different profile types. For example, one type will be for simple user, another type will be for Business profiles.

Buddypress has one new function – Member Types. It’s not available by default and must be registered from theme or from plugin. Here Member type API.

For our themes we added our custom plugin RH Buddypress Member types. You can find it inside Rehub – Plugins tab (you must activate license first in Rehub – Registration). If you use another theme, you can use free plugin BuddyPress Member Type Generator. After enable of plugin, go to Users – BP Member Types and create member types.

Once you create Member types, you can assign different profile fields for member types. First of all, you need to create such fields. Go to Users – Profile fields and create fields there. There are basic (first) group of fields and possibility to add another field groups. Basic field group is group which will be available in registration form. Other groups will be available in Profile Edit page for each user (he can edit them after registration).

By default, when user register on site, he can’t choose member type, he can do this later in his Profile. But you can enable such choosing in registration step. For this, you can use next plugin BP Xprofile Member field

Next thing which you can need is conditional fields in Profile. It’s such fields which are depending on other fields. For example, if user choose Business Profile, he will see several fields, if he choose Customer Member type – he don’t see these fields and can’t edit them. For such case, when you create profile field, assign it to member type. Then, to add Conditional feature – use plugin Conditional profile fields for Buddypress This will allow you to make conditions based on any field, including member type field.

For advanced users, we added also some tips in Registration page of Buddypress in our themes. You can use also css to hide some fields and create different pages for registration different user member types. For example, you have 2 types: free user and business user. You can allow to register them in different pages. For business users, use link of registration page as default link + ?membertype=business. For example, default link is So, for business profiles, use where business is your slug for membertype. When you do this, page will have additional wrapper css class – register_wrap_typebusiness and you can hide separate fields by css. Also, if you have registered member type, for example, “business” member type, user who register from will get “business” member type automatically

For this type of registration I also recommend to use our popup login, but disable registration in popup. You can do this, if you set custom registration link in Theme option – User option – Add custom register link. More information here. For registration url – use url of Buddypress Register page. You can find it in Settings – Buddypress -pages

If you want to create paid membership and divide pro members and free members you can use this way. This is most hardest way for setup but it has most powerful features

For this, you will need to install also S2Member plugin. You also need to setup member types with our plugin (check previous step). Now, the best way is to assign each member type for separate role. S2Member creates 4 roles by default + 1 basic role. Their names are: s2member_level0, s2member_level1, etc

s2member_level0 is reserved role, it’s for free users. You should enable Open registration in S2Member – General Options – Open Registration

Other member roles are for paid membership. So, now, it’s time to assign each role for each member type. When you create each member type inside RH Buddypress Member types plugin you will see in the end next select

Here, assign each member type with role of S2member. Also, set one type as default. Usually, you need to create 1 member type (Free) and assign it to s2member_role0 + make it as default. And one member type which will be paid member type. Assign it to one of S2member role.

So, how this works. When you will register new member with S2member, he gets new role. If plugin finds this role in assigned role, plugin changes also member type. The same works also when user has expired membership. S2member makes such user as Free user with S2member 0 level and plugin will change also his member type automatically. You can assign different profile fields to member types as described above to restrict access for separate user settings.

Now, it’s time to make registration page. If you have paid memberships, you need page where user will be redirected to pay for membership. You can set this page in S2Member – General Options – Membership Options page This page is also will be used when user want to get access to pages which he has no access with his membership level. So, make this page good described. Page must also has all buttons to pay for membership. For such purpose, our themes has special shortcode for price table. You can find it in Visual composer module, shortcode generator or just copy shortcode from our S2 member article. Also we added one ready template for Visual Composer with price table. Example

Inside shortcode you need to add buttons which are generated in S2Member Paypal section.

Inside free registration column, place link to Buddypress Register page. Also, it’s not required to use such shortcode, you can make any content with payment button, for example, using CTA block module in visual composer, etc.

It’s also good to add to this page information about current status of user, his membertype, role, subscription date, etc. S2Member has a wide range of possible shortcodes for this. Theme also has some of shortcode which you can use on page. I guess, most valuable here will be shortcode to show current member type. Use shortcode


Read about other user shortcodes of theme in part of article about shortcodes.

You also need to configure login button in header. If you have only paid memberships – use this page as main registration page. If you have also free level, send users to Buddypress Register pages. So, set url for registration page in Theme option – User Option – Add custom register link. 

Configuring Profile

Ok, you configured registration process, now, it’s time to add some membership functions to User Profile. First of all, don’t forget to set User profile page in Settings – Buddypress. Url slug of this page will be used in Profile pages.

Adding widget area

By default, Profile page doesn’t have widget area, you can enable it in Theme option – Buddypress – Enable widget for Profile page 

Once you do this, you will have widget area which you can configure in Appearance – Widgets. There are some shortcodes which can be helpful to show some data of user in sidebar, you can find shortcodes in the end of article

Adding social profile icons

When you enable widget in previous step, you can add some additional data of profile there. For this, first of all, create Xprofile custom fields in Users – Profile fields. For example, to add facebook profile link add text field where user can add facebook link. Then, add Text widget to Buddypress Profile sidebar widget area. In text widget you can use shortcode to get this data. Check last parts of this article about shortcodes for example

Adding Profile description field and phone, Seo settings

By default, Buddypress doesn’t have description field in registration, but you can add it in Xprofile extension in Users – Profile fields. After creating these fields, type their names in Theme option – Buddypress – Add name of Xprofile field for seo Description

Theme will use data from these field in Seo meta tags and in Meta tags for facebook and social share. You can make these fields available only for special member types, this will give ability for special member types to have advanced seo optimised User pages. Also theme creates seo schema for such profiles as Business places, so such profiles have more chances to have advanced snippets in google and on map. You also will need to add location tab for profiles to have most advanced profiles.

Adding location

For this, just enable Friend extension in Geo My WordPress plugin (must be also installed)

Adding additional Profile data to Profile tab

I guess, that you may need to show additional data for user in his profile. I guess, that there is some data which you want to show only for member when he view his profile and some public data. So, you need to add all data to theme option – Buddypress – Add custom message or html in profile of User

For any public data, just place them in field. Shortcodes will also work. For any private data, wrap them in shortcode

Private content here

For private content, it’s better to set different information from S2member. You can also add buttons for updating profile and wrap them in shortcode of S2member. For example, for users with free role, you can show buttons to update their membership or show expiration date of subscription. Use Conditional shortcodes of S2member with Get shortcodes

My example from Demo site

Hello, <strong class="fontbold rehub-main-color">[s2Get user_field="display_name" /]</strong>
Your Member Type: <strong class="fontbold">[rh_bpmember_type]</strong>
Your role is: <strong class="fontbold">[s2Get user_field="s2member_access_label"]</strong>
Your subscription will expire: <strong class="fontbold">[s2Get user_field="s2member_auto_eot_time" date_format="M jS, Y, g:i a T"]</strong>
Your last payment was in: <strong class="fontbold">[s2Get user_field="s2member_last_payment_time" date_format="M jS, Y, g:i a T" /] </strong>
[s2If current_user_is(s2member_level1)]
Update your account for PRO level: [s2Member-PayPal-Button modify="1" level="2" ccaps="" desc="Update from Starter Kit to PRO level" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="" ta="0" tp="0" tt="D" ra="10" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]<br/><br/>
Cancel all subscriptions: [s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
In some cases, you may need to redirect users after login to their profile. You can use theme redirect option. Go to theme option – User option – Add custom redirect after login url and set url. If you need to redirect user to his profile tab – link will be like, where is your profile page url, %%userlogin%% will be replaced by user login name, profile is slug of profile page inside User profile. You can redirect him to any other, for example on location tab.

How to add Profile’s posts and product tabs and frontend form

To enable product or post tab in user profile, go to Theme option – Buddypress option, and find options to set Post and Product Tab

There are several options. Name and slug is required if you need these tabs. Use short name, use simple slugs from one word, without spaces and special symbols

Position of tab is 20 by default. This means that tab will be visible in profile after Activitity and Profile details tab.

Also, you can choose pages where you have frontend forms for posting posts and products. All content from these pages will be imported in profile.

This will allow to submit posts directly from Profile. I recommend to use our RH Frontend Form plugin (get it in Rehub – Plugins) to create such form.

You can also choose page where you have edit form for posts.

For example, copy shortcode from RH Frontend form and place it in separate page, then choose this page in Theme option – Buddypress

Last option is member type who will have this tab. Means, if you set it as “vendor” – only vendor member type will have such tab.

Adding follow function

By default, Buddypress has friendship function. But for business model it’s not the best way, because each friendship request also need approval from user. What if you want just follow somebody. Use Buddypress follow for this For most advanced using, you can also enable email notification for each action of followed user. I don’t recommend to set this, but you can experiment with this plugin. Place code from gist in file, then in wp-content/plugins and activate

 Member directory, business map locator

Buddypress creates member directory by default in your main Profile page. That’s enough in many cases, but if you want to create more advanced directory, for example, with locator, you should install Geo My wordpress plugin (find link above). With plugin, you will have additional Map link in each user profile where users can add own location. Then, you can use this location in directory. GMW also supports Xprofile fields, so, you can add also search by profile data. My themes has advanced support for plugin, so, you can use one of custom output template and custom form for plugin. Check some basic settings here

Also, one good feature, that each Profile field in Buddypress can have own page. So, you can use them as Member categories. For this, when you create your profile field, check this

You can also hide map tab from several member types. For this use css, example:

.register_wrap_typevendor #location-personal-li{display:inline-block}

will hide map tab from all members except vendor member type.

Restrict content or parts

One of the best feature of S2member is that they allow to restrict content by dynamic url. This means that you can use this to restrict some parts of site for free users. For example, you can restrict ability to set own logo and image, or access for some user tabs. Of course, you also can restrict access to any page or post or any part of post with S2member because they have very powerful restrict module. You can restrict access to private messages, activity, whatever you want, real unlimited possibilities. So, for example, to restrict access for adding custom avatar, you need to add url inside S2Member – Restriction option

Link will be /members/%%current_user_nicename%%/profile/change-avatar/

where members is slug for your profile page in Buddypress, %%current_user_nicename%% will be replaced with user nicename.

You can also use wide range of S2Member conditional shortcodes to restrict access to separate page. For example, you can restrict access to submit form, so, only users with special role can submit something on your site. For this wrap submit form shortcode with conditional shortcodes of S2Member

Shortcodes of theme for Buddypress

You can check also conditional shortcodes for users

Get Profile Data of user (user meta) or Xprofile data

[rh_get_profile_data name='' type='' userid='' usermeta='']

This shortcode will output information from Xprofile field or usermeta. There are several ways to use it.

Inside userid you can set direct user ID.

If you set userid=current, shortcode will get data from current logged user.

If you set userid=vendor, shortcode will get data of Vendor. This works only in WC Marketplace Membership addon and only on store page of vendor.

If you set userid=author, shortcode will get data from current author of post. This shortcode will work only inside inner Post, Page, Product pages.

If you set userid=bpuser, shortcode will get data from current displayed user on Buddypress Profile page. This shortcode will work only inside widgets and custom areas on Buddypress Profile pages.

If you want to get data of Xprofile fields (which you can add in Users – Profile field), set name of field in parameter “name”. If you want to get user meta instead, use parameter “usermeta”.

In type parameter, you can set sanitization. This can be helpful if you have different type of data and you want to be sure that users will not use any XSS, virus scripts inside their data. There are two types: type = ‘text’ will be used for any text data and type=’link’ if user data has links.

Shortcodes for Buddypress Profile Pages

Such shortcodes can be used only on Profile pages. You can add them inside Profile sidebar area or inside Profile Custom code Area (check previous steps about these areas). These shortcodes will show data of current Displayed User of User Profile page.

Conditional member type

[rh_is_bpmember_type type='prouser' bp_user=1]
Content which will be visible if User has type "prouser"

Conditional Member Role

[rh_is_bpmember_role role='vendor' bp_user=1]
Content which will be visible if User has role "vendor"

XProfile user data

[rh_get_profile_data name='interest' userid='bpuser']

Will show Xprofile value of field “interest”

Amount of Custom points from Mycred

[rh_get_profile_data userid='bpuser' pointmeta='custompoint']

User Member Type

[rh_bpmember_type bp_user=1]

This shortcode will show member type of user.

Show private content for users on their Profile page

If you want to show some private info to users when they logged in and visit own Profile page, use this shortcode.


Buddypress Group pages shortcodes


This shortcode is useful on Group pages. You can enable separate widget for Group pages in theme option – buddypress. Use this shortcode to show group admins


This shortcode also is useful on group pages. It will show shop vendor page of group’s admin. Useful if you want to use Groups for Business instead of Profiles.

Synchronization between roles

In some cases, when you use S2Membership plugin or any other plugins for membership, you need to synchronize roles from different plugins. For example, Wc vendor plugin uses own role – vendor. If you enable paid membership, user gets new role after payment and previous role will be deleted. So, user will get new role and lose vendor role. To prevent this – we added option in Theme option – user options – Synchronize one role to other

Example for syncing vendor role and S2member:


Divider is “:”. First part is role which you want to synchronize. Second part is s2member_level0. This is free role of S2member, so, if user gets it, he lose vendor role. By default, he will lose it in any case, so, this part is just to make sure that user lose vendor role once he becomes free user. s2member_level1,s2member_level2 are roles which will make user as vendor once he gets these roles, divider is “,” between roles. If want to make vendor role always, you can use something like


So, blablabla is not existed role, so user never lose vendor role. Once he gets one of S2member roles, he also gets vendor role

Limited Post submission

Our buyers ask very often to make function to limit access for users to submit form. For example, maybe you want to create 3 user member types. Free – no access to submit, Regular Business – access to submit 10 products or posts, PRO – unlimited access. How to do this?

Now, we updated RH Frontend PRO bundled plugin and you can add limited access. When you create form, add number of posts in Form settings – Extended. This number is number of times when user can submit from this form. So, you will need to create two forms, one for Regular member type and one for PRO. Set limits for form for Regular member type. Now, you can show limited form for Regular member type and unlimited form for PRO level. Just wrap form shortcode with one available conditional shortcodes of S2member plugin or shortcode of theme.

Adding roles for activity on site

One of interesting function which I can’t find on community sites is to give users membership and advanced access for their activity on site. This can be easily made by plugin MyCred which track many user actions with his hook and adds user point system. For example, users can get points for login, register, clicks on thumbs, sending messages, daily login, post content, comment and many other things. You can use this instead of S2member membeship We can use this.

Go to Theme option – Buddypress – Give user roles for their Mycred Points

Instead of roles, you can also give users member types. This is in cases if you don’t want to use membership plugins and use only member type system of Buddypress

Don’t forget, that MyCred has a huge amount of awesome addons which can be used for separate Business model (we will add tutorial for this soon). I guess, that you can love Buy MyCred extension to quickly buy points (this can allow to create paid membership but based on Mycred), gateway extension and  Sell Content extension to sell access to something for points. This is good model, users can buy points and them spend them for different things on site. Check all list of MyCred Extensions

Mycred and point system

In Next article I will show you how you can use membership based on point system, when points will be used as payment, users can buy points and spend them on site, change points to roles, etc.

4.5/5 - (141 votes)


  1. Hello, so i can make custom submit posts for each user member type with this tutorial

  2. How show different submit form for each user type? I have 1 basic user type and 2 premium and i want show 2 kind of post submit form for 2 premium user type. How i can do that?

  3. Hello Limit post submit for form work with s2member? I setup 2 form, first with limitation, second with illimitate post submission

  4. I configure RH frontend plugin for thumbnail upload but Payd member can’t upload Thumbnail, not allow by system, any help?

  5. Hello!!!
    When i move users to new group i see this:
    i have below short codes in edit page:

    [s2If current_user_is(s2member_level1)]
    [wpfepp_post_table form=”1″ show_all=0]

    [s2If current_user_can(access_s2member_level2)]
    [wpfepp_post_table form=”2″ show_all=0]

    [s2If !current_user_can(access_s2member_level1)]
    You don’t have access to submit function. Please, update your account – Update to PRO

    • What do you mean by “move user to new group”?

      • i have 3 user group, 1 free, 2 premium with limitation, 3 premium without limitations.
        in screen attached you can see test user i created and assign before group 2 and later group 3 (and viceversa)

        • use

          [s2If current_user_is(s2member_level0)]
          [s2If current_user_is(s2member_level1)]
          [s2If current_user_is(s2member_level2)], etc Check article on S2Member site about conditional shortcodes to understand their logic

        • Thank you! If i want use only 2 user group (free and premium) what kind of shortcode is the better?

        • This is example

          [s2If current_user_can(access_s2member_level1)]
          [s2If !current_user_can(access_s2member_level1)]

  6. Hi, Does products support attributes and do you have ajax layer navigation? Can you send me login to try out vendor and admin functionalities please?

  7. Hello , we are using your theme and RH member Type plugin as well , when we try to access specific member page like :

    we don’t get any result in it even if we do have this member type in backend.

    But in buddypress’s default “members” page , all members are being displayed properly.

    • check options when you create new member type. There is option to enable archives for member type, you must enable it if you need to show type as separate page

  8. Did you ever write the article on using points as payment for a membership site, as per item 12 in the list? I’m sorry, I can’t find it.

  9. how to disable buddypress email confirmation

  10. Hello! How to make same buddypress pro profile like in demo version:
    I installed all plugins, but my profile is ugly, and I dont now what to do.

  11. With my installation of ReHub I’m using WooCommerce for the reviews. I’m keen to integrate BuddyPress as well.
    However, I just saw that S2 Member website says not to run S2Member alongside Woocommerce.
    With Rehub using Woocommerce more, is there an update to this article?

    From the S2Member webpage:
    “Note: s2Member is a turnkey solution that does not require and/or work with other e-commerce platforms. In fact, s2Member was built long before WooCommerce became an established platform and it predates WooCommerce by 2 years. Therefore, you shouldn’t use both WooCommerce and s2Member at the same time; i.e., WooCommerce is not compatible with s2Member, or vice-versa. “

  12. Hi don’t found the next post that you have spoken about in the end of this post. can you give me the link thanks

  13. is the comment plugin very nice what is it called? thank you

  14. I am using a different membership plugin . S2 member doesn’t support indian payment gateway . Can I use my member plugin ? Does it need any custom work if not compatible now . I am ready to pay. Please reply ASAP

  15. All this is interesting, but how do I add a sidebar on individual BuddyPress pages? Such as: The Participants Of The Group Activity. Because these full-width pages don’t look very nice.

  16. How do I update my ReHub theme?

    • You can find information how to update theme in online documentation. You can find it in Rehub – Support section of your site

  17. How would you like to combine Rehub and BuddyBoss Platform?

  18. Can I add rehub with buddy press?

  19. They are such useful and informative tools for the buddypress to build up the community and social network.

Leave a reply

Wordpress optimization, monetizing tips and tricks