Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] member address

  • @pws2015

    Participant

    Hi,
    i need to add member address in member profile on members page.. How i can do this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @coffeywebdev

    Participant

    In the WordPress dashboard, find under “Users” a link titled, “Profile Fields” (Users>Profile Fields)

    Here you can add profile fields to the signup process, if you don’t want to add the fields to signup you need to add a new field group.

    The field group ‘Base’ is added to signup process

    I hope that helps

    @pws2015

    Participant

    hello,
    i have address, city and postal code filed but i need to see this value in page member for each profile row.. for now i see name, avatar and last active time

    @sharmavishal

    Participant

    As mentioned:

    In the WordPress dashboard, find under “Users” a link titled, “Profile Fields” (Users>Profile Fields)

    Here you can add profile fields to the signup process,

    in your case add address, city and postal code fields

    if above is added and you are not able to see then check the visibility of this 3 fields

    @danbp

    Participant

    @pws2015

    assuming your fields names are Address, City and Postal code, add this snippet to bp-custom.php and any logged-in user will see these fields on the Member Directory page underneath the already existing informations.

    function bpex_address_on_directory(  ) {	
    
    if( bp_is_active( 'xprofile' ) && is_user_logged_in() ) :
    
    	echo '<p>';
    
    	if ( $address = xprofile_get_field_data( 'Address', bp_get_member_user_id() ) ) :
    		echo $address.'&nbsp;';
    	endif;
    
    	if ( $zipcode = xprofile_get_field_data( 'Postal code', bp_get_member_user_id() ) ) :
    		echo $zipcode .'&nbsp;';
    	endif;
    
    	if ( $city = xprofile_get_field_data( 'City', bp_get_member_user_id() ) ) :
    		echo $city .'&nbsp;';
    	endif;
    
    	echo '</p>';
    
    endif;
    
    }
    add_filter ( 'bp_directory_members_item', 'bpex_address_on_directory' );

    @pws2015

    Participant

    thanks is solved

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] member address’ is closed to new replies.
Skip to toolbar