Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add Profile to Blog Posts

  • @henrybaum

    Participant

    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)
  • @r-a-y

    Keymaster

    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 );

    @henrybaum

    Participant

    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?

    @r-a-y

    Keymaster

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

    @henrybaum

    Participant

    Done, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add Profile to Blog Posts’ is closed to new replies.
Skip to toolbar