How to display a public profile page for registered users with custom slug?

Every registered user can have profile, they don’t need to have posts.

To change WordPress author’s profile permalink, paste the following code in your functions.php:

function change_author_permalink_base() {
    global $wp_rewrite;
    $wp_rewrite->author_base = "user";
}
add_filter( 'init', 'change_author_permalink_base' );

After pasting the code, visit Settings->Permalink Structure under your wordpress admin, to flush the rewrite rules. This is a required step, otherwise you may get 404 on author profiles.

Then code your author.php. As far as linking is concerned this is totally your design decision. If you want to link the profiles from user’s comment, you can either add the new link or just link comment author name to their profile.

Remember the profile is available only if the user is registered as WordPress user.

Leave a Comment