Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add custom taxonomy to member loop


  • winnischneider
    Participant

    @winnischneider

    Hi Friends
    I use in xprofile a custom taxonomy called “branche”.
    Now I need to Display (echo) the selected taxonomy of each member in the loop and I don’t get it.
    Have somebody any Idee???? I use Bp Nouveau and WP 5.2
    I do not have any Problem to echo the normal custom fields, but the taxonomy don’t want to get shown.
    Thanks for help
    Frank

Viewing 1 replies (of 1 total)
  • Hello, you can add information to output to this hook:

    add_filter( 'bp_nouveau_get_member_meta', function( $meta, $member, $is_loop ){
    	// is_loop is true in the members directory
    	if ( $is_loop ) {
    		// Taxonomy fetching code goes here...$member->ID is the member ID.
    
    		// Then assemble the output.
    		$meta['taxonomy_item'] = "taxonomy item " . $member->ID;
    	}
    	return $meta;
    }, 10, 3 );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar