BuddyDev

Search

BP Ajax Registration Page showing Multiple Xprofile Groups

  • Keymaster
    (BuddyDev Team)
    Posts: 24231
    Brajesh Singh on #1018

    If you want o display multiple group in ajax registration form, here is how to do it.

    1. Simple way, you can put the following code in your bp-custom.php or your theme’s functions.php

    
    
    add_filter( 'bpajaxr_xprofile_args', 'bpajaxr_show_multiple_profile_groups' );
    
    function bpajaxr_show_multiple_profile_groups( $args ) {
    	
    	$args = wp_parse_args( $args );
    	
    	//set groups
    	$args['profile_group_id'] = '1,2,3';//where the values are profile field group id, you must keep 1 as the base group is required
    	
    	$args = build_query( $args );
    	
    	return $args;
    }
    
    

    You can change the group ids as you want.

    2. Alternative way.

    Copy the ajax-register-form.php from bp-ajax-registration plugin to your theme. Now modify it as you want. The plugin will use it.

    Hope that helps.

You must be logged in to reply to this topic.

This topic is: not resolved