WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So the default url to display a list of posts by a particular author looks like this:


I am wondering how to change the 'author' in that url to something else?

I am working on a website for a charter school and they would like to allow each teacher to have a list of posts by "classroom". So the desired url would be


share|improve this question
up vote 5 down vote accepted

You might wish to try.. http://wordpress.org/extend/plugins/custom-author-base/

Hope that helps.. ;)

share|improve this answer

You can add this in your functions, and it will rewrite the slug from default "author" to "classroom",

function new_author_base() {
    global $wp_rewrite;
    $author_slug = 'classroom';
    $wp_rewrite->author_base = $author_slug;
add_action('init', 'new_author_base');

hope it helps you

share|improve this answer
flush_rules() is quite expensive (in resources), so I would not call it on every page load. If you only do this for one site you can leave it out and just visit the Permalinks page, this will flush the rules too. – Jan Fabry Dec 27 '10 at 19:23
Yes @Jan Fabry, you are right, i have edit the answer now. I wrote a better solution. – Philip Dec 27 '10 at 22:34
For anyone wondering whether to use this snippet or the plugin t31os mentioned: the plugin does exactly the same, but with an interface to change the URL part. Since you probably won't change it every month, this snippet in your functions.php is more than enough (and won't be disabled by accident). – Jan Fabry Dec 28 '10 at 7:51
This is perfect. Thanks! – Jake Jun 7 '13 at 20:29

You can add this in your functions.php:

global $wp_rewrite;
$wp_rewrite->author_base = "member"; // or whatever
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.