News & Views.

The latest news, web designs and digital projects happening at Storm.

Sharing is caring:

WordPress: Moving author pages to a different URL or base

Liam Gladdy Profile Image

Liam Gladdy
October 10, 2012

If you need to move WordPress author pages to live on a different URL than the default, that’s outside the base of your blog (like our Team page), then you might find yourself beating your head against WordPress’s rewrite engine.

Don’t panic! It’s only a couple of lines of code in your functions.php file to make this work. For our team page, you just need:

add_action('init', 'rewrite_authors_to_team'); 
function rewrite_authors_to_team() {
  global $wp_rewrite;
  $wp_rewrite->author_base = 'team';
  $wp_rewrite->author_structure = '/team/%author%';
  $wp_rewrite->flush_rules();
}

If you still have problems, you might need to hit save on your permalink settings!