buddypress author link

Solutions on MaxInterview for buddypress author link by the best coders in the world

showing results for - "buddypress author link"
Paul
30 Mar 2017
1// Change Post's Author URL to Buddypress Profile URL
2add_filter('generate_post_author_output','generate_post_author_output_buddyprss_url');
3
4function generate_post_author_output_buddyprss_url( $post_author_profile_link ){
5$post_author_profile_link = sprintf( ' <span class="byline">%1$s</span>',
6			sprintf( '<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%1$s <a class="url fn n" href="%2$s" title="%3$s" rel="author" itemprop="url"><span class="author-name" itemprop="name">%4$s</span></a></span>',
7				__( 'by','generatepress'),
8				esc_url( bp_core_get_user_domain( get_the_author_meta( 'ID' ) ) ),
9				esc_attr( sprintf( __( 'Know more about %s', 'generatepress' ), get_the_author() ) ),
10				esc_html( get_the_author() )
11			)
12		) ;
13return  $post_author_profile_link;
14
15}