Hi, if i understand well: you are looking for a way to display the latest idea a member posted inside the BuddyPress members loop.
here’s how you could do :
function natty_latest_idea_in_members_directory() {
// Ideally, there should be a cache strategy to improve performance.
$idea = wp_idea_stream_ideas_get_ideas( array(
'author' => bp_get_member_user_id(),
'per_page' => 1,
) );
if ( empty( $idea['ideas'] ) ) {
return;
}
$latest_idea = reset( $idea['ideas'] );
if ( ! is_a( $latest_idea, 'WP_Post' ) ) {
return;
}
// always use this function to build the idea permalink!
$latest_idea_link = wp_idea_stream_ideas_get_idea_permalink( $latest_idea );
?>
<p>Latest idea: <a href="<?php echo esc_url( $latest_idea_link );?>" title="<?php echo esc_attr( $latest_idea->post_title );?>"><?php echo esc_html( $latest_idea->post_title );?></a></p>
<?php
}
add_action( 'bp_directory_members_item', 'natty_latest_idea_in_members_directory' );
You must know this will bring you some overload in the display of the members directory. There should be a cache strategy to avoid to request for posts at each member. So i think, i wouldn’t advise you to use this as is, but i would advise you to ask a WordPress/BuddyPress developer to build the feature so that it doesn’t overload too much the loading of this specific page.