Support for BuddyPress Xprofiles

widgetIn version I have added support for BuddyPress Xprofiles

If you have BuddyPress installed you will now be able to pick to display items from the Xprofile.

As there are a number of add-on that extent the type of values stored I also added filter to allow your control the outputted HTML


Here is the code that created the example above it that takes a color value and sets the background color to match

* Example filter
* @param $html
* @param $args
* @param $value
* @return mixed
function display_extra_template( $html, $args , $value ){
if( 'color' == $args['field'] ){
$html = str_replace( 'class=', 'style="background-color:' . $value . '" class=', $html );
return $html;
add_filter( 'aa_user_display_extra_template', 'display_extra_template', 10 , 3 );

Please let know if you have problem with this.

%d bloggers like this: