Skip to:
Content
Pages
Categories
Search
Top
Bottom

Edit Author Bio via Buddypress

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

  • Henry Wright
    Moderator

    @henrywright

    It isn’t possible by default. You would need to link an xProfile field with the author description.

    Try this. Note that I’ve used field ID 1 on the 2nd line. You’ll need to change this to the ID of your xProfile field.

    function deanljbirch_save_author_bio( $data ) {
        if ( 1 == $data->field_id ) {
            wp_update_user(
                array(
                    'ID' => $data->user_id,
                    'description' => $data->value
                )
            );
        }
    }
    add_action( 'xprofile_data_after_save', 'deanljbirch_save_author_bio' );

    If a member updates the xProfile field, their author bio will be updated. Note that updates to the author bio won’t be synchronised with the xProfile field.


    deanljbirch
    Participant

    @deanljbirch

    That worked a charm, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar