Create a Profil Url to the mainsite User-Profile
Hi, i need some help!
I run my mainsite with frontend registration and frontend user profiles like: xxxxxxxxx.com/user/anyusername
I also installed bbpress and ONLY ALLOW USERS TO REGISTER FROM THE MAINPAGE – mentioned above.
I show the Forum in a page wiht the shortcode… the forum url is: xxxxxxxxx.com/forum/
SO far it works great!
My setting for the forum user profile slug is like that:
xxxxxxxxxx.com/forum/mitglied/anyusername (“mitglied” is for “user” in german)
My Question 🙂
In the users FORUM PROFILE page i have on the left site under the users Profile the menu links. The first of them links to the users FORUM PROFILE like:
Now i need the same URL LINK to the users MAINSITE PROFILE wich should be like:
IN …..bbpress/templates/default/bbpress/user-details.php it calls the url for the USERS FORUM PROFILE with this line of code:
<a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php printf( esc_attr__( "%s's Profile", 'bbpress' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>" rel="me"><?php _e( 'Profile', 'bbpress' ); ?></a>
How can i get the users MAINSITE PROFILE URL? (xxxxxxxxxxx.com/user/anyusername)
I cant find anything in the bbpress and wordpress docs 🙁 or im not intelligent enough to find a solution… i think to remove the slugs from the url is not possible to get a desired url structure for the link. I think there must be a other filter function for the users MAIN SITE PROFILE url…???
I think i must mention this:
I already managed to show the USERS AVATAR from the MAINSITE in the forum page with this code:
<?php $user_info = get_user_by('id', $wp_query->query_vars['author']); echo get_avatar($user_info->ID, '150'); ?>
The avatar call works great – hope it is possible to get the USERS PROFILE URL too 🙂
Thank you so much!
- You must be logged in to reply to this topic.