WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] Display Author with link to buddypress profile (5 posts)

  1. teeray
    Member
    Posted 10 months ago #

    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/

  2. wagnerlandio
    Member
    Posted 8 months ago #

    use - >

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

  3. daymobrew
    Member
    Posted 8 months ago #

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

  4. wagnerlandio
    Member
    Posted 8 months ago #

    The version of my BuddyPress is 2.3.2 and is working

  5. teeray
    Member
    Posted 8 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic