Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add additional fields to the member directory listing


  • joewalkling
    Participant

    @joewalkling

    Hi there
    I am using this code to display members Business name on their directory listing.

    function add_info_to_members_loop() {
        echo bp_get_member_profile_data( 'field=Business' );
    }
    add_action( 'bp_directory_members_item', 'add_info_to_members_loop' );


    I would also like to add a Location field to this, so that their location is visible on the direcoty listing also, but I’m unsure if and how to adjust the above code.

    Many thanks

Viewing 1 replies (of 1 total)

  • shanebp
    Moderator

    @shanebp

    Please use the code button when posting code.
    Assuming your location field is called “Location”, try this adjustment:

    echo bp_get_member_profile_data( 'field=Business' );
    echo '<br>';
    echo bp_get_member_profile_data( 'field=Location' );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar