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

  1. teeray
    Posted 1 year 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>';


  2. wagnerlandio
    Posted 1 year ago #

    use - >

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

  3. daymobrew
    Posted 1 year ago #

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

  4. wagnerlandio
    Posted 1 year ago #

    The version of my BuddyPress is 2.3.2 and is working

  5. teeray
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Display Posts Shortcode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic