Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom fields in Member Display Page


  • acieffe
    Participant

    @acieffe

    I am running WordPress 4.9.5 with the Sweetdate Theme. Buddpypress 2.9.4 http://housing.digitalelegance.com/members/

    I am trying to get a few of the profile fields to show up under the member name on the members page. I tried to edit the member-loop.php and nothing was showing up. At the moment I have hidden the following areas through CSS

    .search-item .date {display:none;}
    .search-item .search-body{display:none;}

    I need some real world help in displaying these fields. Any other information you may need, just ask. Thank you

Viewing 4 replies - 1 through 4 (of 4 total)

  • shanebp
    Moderator

    @shanebp

    If that theme has not removed the bp_directory_members_item hook from the members-loop template, then you could use this function in bp-custom.php

    Assuming you have a profile field named ‘Title’ …

    function acie_show_member_data() {
    
    	$title =  bp_get_member_profile_data( 'field=Title' );
    
    	if ( $title != '' ) {
    		$str = $title . '<br>';
    		echo $str;
    	}
    	
    }
    add_action( 'bp_directory_members_item', 'acie_show_member_data' );

    acieffe
    Participant

    @acieffe

    Call me a noob, but that didn’t make much sense to me. I’m not sure what hooks are, and I don’t know where bp-custom.php is.


    shanebp
    Moderator

    @shanebp

    >I’m not sure what hooks are

    Look for that text in your theme’s member-loop template.

    >and I don’t know where bp-custom.php is.

    I provided a link to the documentation in my reply.


    acieffe
    Participant

    @acieffe

    Thanks for pointing me to the theme’s member-loop.php, this is the one I can edit. I was working on the plugin one. I just need to find out how to Call the right data

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