Link to Ultimate Member Profiles
Quote from collab on February 5, 2018, 2:00 amHi MrVector,
You can add the following to your theme’s functions.php file:
add_filter( 'register_url', 'my_register_page' ); function my_register_page( $register_url ) { return home_url( '/register/' ); }This works well with the Ultimate Member plugin.
Hi MrVector,
You can add the following to your theme’s functions.php file:
add_filter( 'register_url', 'my_register_page' ); function my_register_page( $register_url ) { return home_url( '/register/' ); }
This works well with the Ultimate Member plugin.
Quote from childledj on April 12, 2018, 7:32 pmHello!
After UM upgrade old links made with code from your first answer do not works properly
Let me explain – Links from forum (Menu > USERS LIST and MY PROFILE) and have no slash after username and after click on link page redirect to login page
links from UM list of users have slash and redirect to user profile as it should be
How to modify this code to make it works properly?
function my_link($link, $user) { return 'https://mysite.ru/user/'.$user->user_login; } add_filter('asgarosforum_filter_profile_link', 'my_link', 10, 2);
Hello!
After UM upgrade old links made with code from your first answer do not works properly
Let me explain – Links from forum (Menu > USERS LIST and MY PROFILE) and have no slash after username and after click on link page redirect to login page
links from UM list of users have slash and redirect to user profile as it should be
How to modify this code to make it works properly?
function my_link($link, $user) { return 'https://mysite.ru/user/'.$user->user_login; } add_filter('asgarosforum_filter_profile_link', 'my_link', 10, 2);
Quote from collab on April 12, 2018, 8:16 pmHi childledj,
I have updated to UM 2.0.5 and the user profile links still work fine with the code you mentioned. Here is my rendition which modified the generic my_link to my_prof_link
function my_prof_link($link, $user) { return 'http://mysite.com/user/'.$user->user_login; } add_filter('asgarosforum_filter_profile_link', 'my_prof_link', 10, 2);
Hi childledj,
I have updated to UM 2.0.5 and the user profile links still work fine with the code you mentioned. Here is my rendition which modified the generic my_link to my_prof_link
function my_prof_link($link, $user) { return 'http://mysite.com/user/'.$user->user_login; } add_filter('asgarosforum_filter_profile_link', 'my_prof_link', 10, 2);
Quote from childledj on April 13, 2018, 9:38 amI have use another solution:
function my_link($link, $user) { return 'https://www.mysite.ru/user/'.$user->user_login."/"; } add_filter('asgarosforum_filter_profile_link', 'my_link', 10, 2);But “slash” wasn’t my problem, but missing “www” in link!
I have use another solution:
function my_link($link, $user) { return 'https://www.mysite.ru/user/'.$user->user_login."/"; } add_filter('asgarosforum_filter_profile_link', 'my_link', 10, 2);
But “slash” wasn’t my problem, but missing “www” in link!
Quote from DesBen on April 20, 2018, 2:24 pmHey,
If you need to link username on “post-author”, I have one solution.
In forum-profile.php, replace :
public function getProfileLink($userObject) { if ($this->hideProfileLink() || !$this->functionalityEnabled()) { return '%s'; } else { $profileLink = $this->asgarosforum->getLink('profile', $userObject->ID); $profileLink = apply_filters('asgarosforum_filter_profile_link', $profileLink, $userObject); return '<a class="profile-link" href="/profil/'.$userdata->user_nicename.'">%s</a>'; } }by this :
public function getProfileLink($userObject) { $profileLink = $this->asgarosforum->getLink('profile', $userObject->ID); $profileLink = apply_filters('asgarosforum_filter_profile_link', $profileLink, $userObject); return '<a class="profile-link" href="/profile/'.$userObject->user_nicename.'">%s</a>'; }Change “/profile/” by your profile page link.
Hey,
If you need to link username on “post-author”, I have one solution.
In forum-profile.php, replace :
public function getProfileLink($userObject) { if ($this->hideProfileLink() || !$this->functionalityEnabled()) { return '%s'; } else { $profileLink = $this->asgarosforum->getLink('profile', $userObject->ID); $profileLink = apply_filters('asgarosforum_filter_profile_link', $profileLink, $userObject); return '<a class="profile-link" href="/profil/'.$userdata->user_nicename.'">%s</a>'; } }
by this :
public function getProfileLink($userObject) { $profileLink = $this->asgarosforum->getLink('profile', $userObject->ID); $profileLink = apply_filters('asgarosforum_filter_profile_link', $profileLink, $userObject); return '<a class="profile-link" href="/profile/'.$userObject->user_nicename.'">%s</a>'; }
Change “/profile/” by your profile page link.
Quote from DesBen on May 19, 2018, 7:13 pmHello,
After last update (1.9.0), old solution doesn’t work. Here is the new code :
public function getProfileLink($userObject) { $profileLink = $this->asgarosforum->get_link('profile', $userObject->ID); $profileLink = apply_filters('asgarosforum_filter_profile_link', $profileLink, $userObject); return '<a class="profile-link" href="/profil/'.$userObject->user_nicename.'">%s</a>'; }
Hello,
After last update (1.9.0), old solution doesn’t work. Here is the new code :
public function getProfileLink($userObject) { $profileLink = $this->asgarosforum->get_link('profile', $userObject->ID); $profileLink = apply_filters('asgarosforum_filter_profile_link', $profileLink, $userObject); return '<a class="profile-link" href="/profil/'.$userObject->user_nicename.'">%s</a>'; }
Quote from v490 on May 22, 2018, 10:23 pmHello Desben,
I also have problems since the update 1.9. Where did you insert this code?
Originally I had the following code in the functions.php inserted by the theme:function my_link($link, $user) {
return ‘http://myhakotrac.de/user/’.$user->user_login;
}
add_filter(‘asgarosforum_filter_profile_link’, ‘my_link’, 10, 2);Unfortunately, I do not know well with codes and would need precise instructions.
Thanks Robert
Hello Desben,
I also have problems since the update 1.9. Where did you insert this code?
Originally I had the following code in the functions.php inserted by the theme:
function my_link($link, $user) {
return ‘http://myhakotrac.de/user/’.$user->user_login;
}
add_filter(‘asgarosforum_filter_profile_link’, ‘my_link’, 10, 2);
Unfortunately, I do not know well with codes and would need precise instructions.
Thanks Robert
Quote from collab on May 22, 2018, 11:08 pmI’m using 1.9.0 and can confirm that the same filter for the user profile links still works. Here is the excerpt from my functions.php:
function my_prof_link($link, $user) { return '/user/'.$user->user_login; } add_filter('asgarosforum_filter_profile_link', 'my_prof_link', 10, 2);
I’m using 1.9.0 and can confirm that the same filter for the user profile links still works. Here is the excerpt from my functions.php:
function my_prof_link($link, $user) { return '/user/'.$user->user_login; } add_filter('asgarosforum_filter_profile_link', 'my_prof_link', 10, 2);
Quote from Asgaros on May 23, 2018, 12:10 amHello @v490
The official way using the asgarosforum_filter_profile_link should still work fine. Do you get any error? How does the generated link looks like?
Hello @v490
The official way using the asgarosforum_filter_profile_link should still work fine. Do you get any error? How does the generated link looks like?
Quote from v490 on May 23, 2018, 8:36 pmThank you for your prompt reply.
The problem has settled after an update by Ultimate Member.
Everything will be displayed again as usual.
Greetings Robert
Thank you for your prompt reply.
The problem has settled after an update by Ultimate Member.
Everything will be displayed again as usual.
Greetings Robert