Thank God! I found the answer just when I need it, and I’ll like to share with all of you. As well as for myself in case I forget.
I went to loop-single-reply.php in bbpress-theme-compat/bbpress
I added below residence;
by the way ‘residence’ is the usermeta key that I have used for country of the author. I used the User Meta Pro plugin to create that field in registration and attached the usermeta key to that piece of information. Hope this helps whoever is looking for it
-
This reply was modified 7 months, 3 weeks ago by
kate.t.
i don’t know whats happening, the code is not showing
I added below < ?php do_action( 'bbp_theme_after_reply_author_details' );
$user_id = bbp_get_reply_author_id( $reply_id );
$usermeta = get_userdata( $user_id, 'residence' );
echo $usermeta->residence;
Kate t
Thanks for posting this, saved me hours of trying to work out which file I needed to change, and how to code it.
For those that want to add fields to their users, as well as Kate’s Meta pro, the following link shows how to add and use custom field, and the combination of these two made it quick and simple
http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields
I also added the ability within BBpress for the user to change their location within the built in profile amend by changing Form-user-edit.php (located in web/wp-content/plugins/bbpress/templates/default/bbpress
The following was added after line 125
<?php bbp_edit_user_display_name(); ?>
BBpress version 2.3.1
<div>
<label for="town"><?php _e( 'Town', 'bbpress' ); ?></label>
<input type="text" name="town" id="town" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'town' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
</div>