Skip to:
Content
Pages
Categories
Search
Top
Bottom

fields in sidebar


  • mrblade
    Participant

    @mrblade

    hi, use the xprofile plugin. I set the directory page to show only one profile, with ( bp_has_members( ‘per_page=1&type=random’ ) ).
    I would like to show the fields of the current profile (bp_directory_members_item) in the sidebar, or in a widget. I have tried in some ways but the problem is that the sidebar is out of the member loop.

    for call xprofile fields i use this in bp-custom.php

    
    add_action('bp_directory_members_item', 'bphelp_dpioml');
    function bphelp_dpioml(){
    $bphelp_my_profile_field_1='field1';
    $bphelp_my_profile_field_2='field2';
    if( is_user_logged_in() && bp_is_members_component() ) { ?>
    <div class="bph_xprofile_fields" style=" margin-left: 25%;">
    <?php echo $bphelp_my_profile_field_1  ?>:&nbsp;<?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_1 );  ?><br />
    <?php echo $bphelp_my_profile_field_2  ?>:&nbsp;<?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_2 );  ?><br />                    
    </div>
    }
    }
    

    anyone have any idea how can I do?
    Thanks!!
    andrea

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar