Skip to content

How To Change WordPress Author Slug

By default, a WordPress author’s profile is accessible by using /author/ slug, but if sometimes you may need to change the author slug to match your site’s niche. Just like it’s not a suitable slug if your WordPress is an online shop or service.

You can easily change the author slug with a this simple snippet. Add following snippet to your functions.php file:

add_action('init', 'cng_author_base');
function cng_author_base() {
    global $wp_rewrite;
    $author_slug = 'profile'; // change slug name
    $wp_rewrite->author_base = $author_slug;
}

Replace profile in fourth line with your custom slug.

Leave a Reply

Your email address will not be published. Required fields are marked *