I managed to show up the users Profile Images from the mainsite xxxxx.com/
in my bbpress forum xxxxx.com/forum/ with the following code:
<?php $user_info = get_user_by('id', $wp_query->query_vars['author']); echo get_avatar($user_info->ID, '150'); ?>
Question:
How can i get the Users Profile URL/LINK like xxxxxx.com/user/username with the same method?
Thank you so much!
To get user’s profile link like xxxxxx.com/author/username/ use the following function:
Here is the documentation.
If you want to edit a user from admin side then you can use this:
User Page URL is working
wp function => get_author_posts_url( int $author_id, string $author_nicename = ” )
Reference Link : https://codex.wordpress.org/Function_Reference/get_the_author_link
This function should help:
https://codex.wordpress.org/Template_Tags/the_author_meta
the_author_meta( $field, $userID );
for profile link you’ll need ‘user_url’ for the field
For getting user link with its nice name use 2 functions:
https://developer.wordpress.org/reference/functions/get_the_author_meta/
get_author_posts_url($user_id, get_the_author_meta(‘user_nicename’, $user_id))