Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How do I link blog post authors to their BP profiles?

@quintinm

Participant

Hello.
I am also looking to link the author’s box to the BB profile page instead of the standard authors page.
I am using buddyboss and the buddyboss child theme.
I wish i was more proficient at coding, but i am not, so I need advice on how to do this please.

How would I create the function that will link to the BB profile page?

// Change Post’s Author URL to Buddypress Profile URL
add_filter(‘generate_post_author_output’,’generate_post_author_output_buddyprss_url’);

function generate_post_author_output_buddyprss_url( $post_author_profile_link ){
$post_author_profile_link = sprintf( ‘ <span class=”byline”>%1$s</span>’,
sprintf( ‘<span class=”author vcard” itemtype=”http://schema.org/Person&#8221; itemscope=”itemscope” itemprop=”author”>%1$s <span class=”author-name” itemprop=”name”>%4$s</span></span>’,
__( ‘by’,’generatepress’),
esc_url( bp_core_get_user_domain( get_the_author_meta( ‘ID’ ) ) ),
esc_attr( sprintf( __( ‘Know more about %s’, ‘generatepress’ ), get_the_author() ) ),
esc_html( get_the_author() )
)
) ;
return $post_author_profile_link;

}

Skip to toolbar