views:

29

answers:

1

Instead of www.example.com/author/xyz, I want to use www.example.com/artist/xyz.

I was hoping it was as easy as copying author.php to artist.php in my theme directory, but no such luck. Where does wordpress handle the special processing for the author archive pages?

.htaccess rewriting is another option, but I wasn't able to get anything to work with the existing wordpress rewrite rules.

Thanks,

+2  A: 

Place this code in the functions.php of your theme:

add_filter(
    'init',
    create_function(
        '$a',
        'global $wp_rewrite;
        $wp_rewrite->author_base = "artist";
        $wp_rewrite->flush_rules();'
    )
);
toscho
Thanks toscho, works perfect!
Ben Burleson
I ran into a problem where the filter was no longer working. I added a priority argument to the add_filter call to get it working again.
Ben Burleson