I cant remove ?author=N url to a nicename in WordPress

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.

Read More

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.

Related posts

Leave a Reply

1 comment