Re: Can you run multiple profile loops in single/profile-loop.php ?
ok, with thanks to http://cleverness.org/2010/08/08/add-user-types-to-wordpress-and-buddypress/ found another starting point:
Put this in you BuddyPress theme /registration/register.php file:
`
User Type A
User Type B
User Type C
`
Put the following code in your theme’s functions.php:
`<?php
/* Add sign-up field to BuddyPress sign-up array*/
function bp_custom_user_signup_field( $usermeta ) {
$usermeta = $_POST;
return $usermeta;
}
add_filter( ‘bp_signup_usermeta’, ‘bp_custom_user_signup_field’ );
/* Add field_name from sign-up to usermeta on activation */
function bp_user_activate_field( $signup ) {
update_usermeta( $signup, ‘signup_type’, $signup );
return $signup;
}
add_filter( ‘bp_core_activate_account’, ‘bp_user_activate_field’ );
function synchro_wp_usermeta($user_id, $password, $meta) {
global $bp, $wpdb;
$type = $meta[signup_type];
update_usermeta( $user_id, ‘signup_type’, $type );
}
add_action( ‘wpmu_activate_user’, ‘synchro_wp_usermeta’, 10, 3);
`
This should create selection of account types on the signup page.
If anyone knows how to update profile-loop.php, so that every account type would have different profile group, please share your opinion.
thanks.