I’m curious if its possible (and advisable) to change certain directory names and URL structure via customization by themes or plugins. For example, say I wanted the list of all a user’s posts to appear at blog.com/people/username instead of at blog.com/author/username…is this possible via customization? If so, would this type of customization be very problematic when it comes to things like forward compatibility with the latest WP updates and such?

Any advice anyone can offer on this would be most appreciated.

Thanks.

Eddie

3 Answers
3

@kureikain’s answer looks great, and it probably works really well in a wide variety of circumstances.

But for author URLs specifically, there’s a simpler way. Change the author_base, like so:

global $wp_rewrite;
$wp_rewrite->author_base = "people";
$wp_rewrite->flush_rules();

You should only need to run this once, perhaps on a plugin activation. Updating WordPress should not affect this solution.

EDIT
As @Jan pointed out in the comments, you need to run this on every init. But you only have to flush the rules once.

Leave a Reply

Your email address will not be published. Required fields are marked *