Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add Profile to Blog Posts

  • Avatar of henrybaum
    henrybaum
    Participant

    @henrybaum

    Anyone know how I might be able to automatically add each blogger’s BP profile to the bottom of their blog post?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    You’d need to hook into “the_content” filter.

    Something like this in wp-content/plugins/bp-custom.php will work:

    function my_hook_into_blog_post( $content ) {
    if( is_single() ) :
    $profile = PROFILE STUFF; // look into bp-xprofile.php and bp-xprofile/bp-xprofile-templatetags.php to grab profile data

    $content = $content . $profile;

    endif;

    return $content;
    }
    add_filter( ‘the_content’, ‘my_hook_into_blog_post’, 20 );

    Avatar of henrybaum
    henrybaum
    Participant

    @henrybaum

    Thanks, tried that. Deleted it. Now get:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home1/seoword1/public_html/selfpublishingreview/wp-content/plugins/bp-custom.php:8) in /home1/seoword1/public_html/selfpublishingreview/wp-content/plugins/si-captcha-for-wordpress/si-captcha.php on line 763

    Now what?

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    You have blank spaces either at the beginning of your PHP opening tag or at the end. Delete them.

    Avatar of henrybaum
    henrybaum
    Participant

    @henrybaum

    Done, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.