Probably should be something simple, but I looked at many sites a solution to my problem.
I’m trying to remove the url ?author=N of a page of my site.
I want to change www.mydomain.com/?author=13 to www.mydomain.com/profile/username So far I removed author url, however the id is still there.
My current code is:
}
public static function get_profile_url($user_id = 0) {
if ($user_id > 0) {
$profile_url.="profile/" . $user_id;
}
Not sure, but I think my target is $user_id I’ve used other alternatives such as $user_nicename but it still fails, any tips? thank you in advance for attention.
You need to activate friendly url in Options -> Permalinks. Do you have activated?
If yes, your url will be domain.com/author/user_name