Change WordPress author permalink structure




Change WordPress author permalink structure

Change WordPress author permalink structure

WordPress author permalink structure

The default WordPress author permalink structure for authors is /author/name. For example, on WPbeginner author URL is www.wpbeginner.com/author/wpbeginner/

If your client required to change author slug to another on like user, profile, member or another word, you can do the task easily using our simple WordPress snippets in your theme's functions.php file.

Change WordPress author permalink

Add the below snippets to your or your client WordPress theme's functions.php file for Change the Author Slug URL Base without a plugin.

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

Note: Look at line number 4. Here, I change author slug as member. You can use your own. 

Thanks 

Source



leave a comment
Please post your comments here.

Search Free SEO Tools