Support » Plugin: Display Posts Shortcode » Display Author with link to buddypress profile

  • Resolved teeray

    (@teeray)


    Hi there,

    Thanks for the great plugin!

    I’m trying to display the author in the shortcode and have that link to the author’s buddypress profile. I’m using the following code in my display_posts_shortcode_output filter, however it seems to want to link to the page it’s displayed on:

    $author = '<div class="author"><a rel="author" href=' . bp_core_get_userlink( $post->post_author ) . '>' . get_the_author() . '</a></div>';

    http://wordpress.org/plugins/display-posts-shortcode/

Viewing 4 replies - 1 through 4 (of 4 total)
  • use – >

    $author = apply_filters( ‘display_posts_shortcode_author’, ‘ <span class=”author”>by ‘ . bp_core_get_userlink( $post->post_author ) . ‘</span>’ );

    daymobrew

    (@daymobrew)

    That filter does not exist in the latest release version (2.3) but is forthcoming.

    wagnerlandio

    (@wagnerlandio)

    The version of my BuddyPress is 2.3.2 and is working

    teeray

    (@teeray)

    Latest version of BuddyPress is 1.8, and it is not working.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Author with link to buddypress profile’ is closed to new replies.