Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Alternative Usage of a Profile Field

Hi guys,

thanks for the ideas. So far I got this running:

<?php if ( bp_has_profile('profile_group_id=2') ) : ?>

<?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>

<?php if ( bp_profile_group_has_fields() ) : ?>

<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>

<?php if ( bp_field_has_data() ) : ?>

style="<?php bp_the_profile_field_value() ?>"

<?php endif; ?>

<?php endwhile; ?>

<?php endif; ?>

<?php endwhile; ?>

<?php else: ?>

<?php endif;?>

And this indeed outputs the desired value, but it is also wrapped in a paragraph and autolinked. Please do note that I have no idea what I am doing here, weather it is valid, good or anything else, this just got the job done, so it’s a starting point.

I have searched the forum and found this code that is supposed to remove the autolinking:

<?php

function remove_links(){

remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 2 );

}

add_action( 'plugins_loaded', 'remove_links' );

?>

However it doesn’t do that once placed in bp-custom.php

Any pointers?

Skip to toolbar