Forum Replies Created
-
You guys should look at template.php from bbPress (includes>common) and take that example to develop something similar for UserPro profiles.
template.php line 2579 (bbPress):
PHP1234567891011121314151617181920212223242526272829303132// Profile page} elseif ( bbp_is_single_user() ) {// User is viewing their own profileif ( bbp_is_user_home() ) {$new_title['text'] = esc_attr_x( 'Your', 'User viewing his/her own profile', 'bbpress' );// User is viewing someone else's profile (so use their display name)} else {$new_title['text'] = sprintf( esc_attr_x( "%s's", 'User viewing another users profile', 'bbpress' ), get_userdata( bbp_get_user_id() )->display_name );}// User topics createdif ( bbp_is_single_user_topics() ) {$new_title['format'] = esc_attr__( "%s Topics", 'bbpress' );// User rueplies created} elseif ( bbp_is_single_user_replies() ) {$new_title['format'] = esc_attr__( "%s Replies", 'bbpress' );// User favorites} elseif ( bbp_is_favorites() ) {$new_title['format'] = esc_attr__( "%s Favorites", 'bbpress' );// User subscriptions} elseif ( bbp_is_subscriptions() ) {$new_title['format'] = esc_attr__( "%s Subscriptions", 'bbpress' );// User "home"} else {$new_title['format'] = esc_attr__( "%s Profile", 'bbpress' );}in reply to: Remove or modify profile title?in reply to: font iconsSolution:
You’ll need to add this in your theme’s functions.php or bbpress-functions.php
PHP1234567891011121314151617181920212223/*** Use the display name instead of username in bbPress profiles URL*/add_action( 'init', 'nicenames_to_display_name' );function nicenames_to_display_name() {foreach ( get_users() as $user ) {if ( $user->data->user_status == 0 && $user->data->user_nicename != $user->data->display_name ) {$user_ids[] = $user->ID;}}foreach( $user_ids as $uid ) {$info = get_userdata( $uid );$display_name = $info->data->display_name;if ($display_name) {$args = array('ID' => $uid,'user_nicename' => strtolower(str_replace(" ", "_", $display_name)));wp_update_user( $args );}}}source: https://bbpress.org/forums/topic/user-profile-url-uses-the-username-can-that-be-changed/
Additionally (optional) you can add this too:
PHP123456789101112/*** Add @mentionname after bbpress forum author details*/add_action( 'bbp_theme_after_reply_author_details', 'mentionname_to_bbpress' );function mentionname_to_bbpress () {$user = get_userdata( bbp_get_reply_author_id() );if ( !empty( $user->user_nicename ) ) {$user_nicename = $user->user_nicename;echo "@".$user_nicename;}}source: https://bbpress.org/forums/topic/putting-the-mention-below-name/
enjoy!
in reply to: bbPress @mentions vs. UserPro
Viewing 3 posts - 1 through 3 (of 3 total)