Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Signature


  • maxmore88
    Participant

    @maxmore88

    Looking for a way to add a signature to the profile within buddypress. I have seen a few posts on this, some are poorly explained, tried a couple but nothing is working. Anyone found a simple way to do this?

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

  • Henry Wright
    Moderator

    @henrywright

    The bp_after_profile_content hook fires after the display of member profile content. You will need to:

    1. Write a custom function to “get” and “output” the signature.
    2. Hook your custom function to the hook I mentioned above so that the signature is displayed on the profile page.

    maxmore88
    Participant

    @maxmore88

    No idea what that means, surprised this is not standard part of buddypress and even more surprised there is no plug to do this.


    danbp
    Moderator

    @danbp

    It is standard! At least if you use xprofile component to let your users enter their signature.

    1) Create a new field. Call it Signature and give it a textarea type.
    2) Once this field is edited by a user, during registration or later, the signature appears on his profile.

    3) if you want this field somewhere else, for ex on the profile header, you simply write a function to call this field and hook it into the template you want.

    Ie. Add this to child theme functions.php or bp-custom.php

    function my_signature() {	
    if ( bp_is_active( 'xprofile' ) )
       if ( $signature = xprofile_get_field_data( 'Signature', bp_get_member_user_id() ) ) : // field name; case sensitive				
          echo $signature;	
       endif;
    }
    add_filter( 'bp_before_member_header_meta', 'my_signature' );

    Or to use Henry’s advice
    add_filter( 'bp_after_profile_content', 'my_signature' );

    Reference

    User Extended Profiles

    Displaying Extended Profile Fields on Member Profiles

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Profile Signature’ is closed to new replies.
Skip to toolbar