Want to know what WordPress Theme a site is using? Check Out Now!

How to Change Author Slug Base in WordPress?

Are you looking for a way to change the author slug base in WordPress?

By default, WordPress generates SEO friendly URL structure fetched directly from the post heading. These URLs are known as permalinks in WordPress. You can also edit the post, page, and category slugs.

However, WordPress doesn’t have an option to edit the author slug. So, if you want to change the author slug base to a customized slug, you can use the below code snippet.

/**
 * Change Author URL Slug & Base in WordPress
 */
function maverick_change_author_slug_base()
{
    global $wp_rewrite;
    
    $author_slug = 'profile'; // change slug name
    
    $wp_rewrite->author_base = $author_slug;
}
add_action( 'init', 'maverick_change_author_slug_base' ); 

Leave a Reply

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