Cleverness – WordPress Resources

Tag: buddypress

Updated BuddyPress User Roles Code

My post on adding user types to WordPress and Buddypress has been very popular.

This code will soon be available as a plugin.

I’ve updated the code so it’s cleaner and easier to implement. This code also works with or without allowing users to add new sites.

This only works for BuddyPress running on the multisite version of WordPress.
If you’re using the regular version, someone else has a plugin available for that: WP Roles at Registration. It works for BuddyPress (but not the multisite version).

Instructions

Set up your custom WordPress roles using Capability Manager or a similar … continue reading

User Types in BuddyPress – Assign xprofile Groups

As requested by Janis, here is the code I use to show only certain xprofile groups to each user type. In the default BuddyPress theme, profile fields without a value aren’t shown, so only the ones for that group will appear to the public.

You will need to replace a function call in your BuddyPress theme, in /members/single/profile/edit.php. It is at line 12 in mine.

Find

And replace it with this:

In /plugins/bp-custom.php place the following code. You will need to edit it to fit your user type and profile group needs.… continue reading

Adding User Types to WordPress and BuddyPress – with User Blogs

There is a new version of this code located at http://cleverness.org/2011/01/27/updated-buddypress-user-roles-code/. Please use that code and leave all comments on that page.

I’ve previously talked about adding user types to BuddyPress. I’ve found out recently that if you allow new users to create their own blogs, you will need to add the following code to your functions.php file.… continue reading

Add User Types to WordPress and BuddyPress

One thing I needed to do was allow people to choose a user type at registration. I also needed the user to be assigned a custom Role based on their user type.