DEV Community

Cover image for How to change the author permalink in Wordpress
SeanAUS120
SeanAUS120

Posted on

How to change the author permalink in Wordpress

Here's a handy snippet to change the default author permalink that Wordpress spits out. I use this quite often so the author URLs don't become email addresses etc.

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;
}
Enter fullscreen mode Exit fullscreen mode

Currently in use at:
Wheatpaste Poster Printing
Same Day Poster Printing
Large Poster Printing
Large Poster Printing
Poster Printing NYC
Poster Printing NYC
OOH Marketing
11x17 Poster
12x18 Poster
12x28 Poster
12x36 Poster
18x24 Poster
20x16 Poster
22x28 Poster
24x36 Poster
25x39 Poster
48x72 Poster

Top comments (0)