Introduction
WordPress uses the /author/ base in author archive URLs by default. While there is no built-in setting to modify this behavior, you can change the author URL slug by adding a small custom function to your active theme. This guide explains how to change the WordPress author URL slug safely using custom code.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- Go to Appearance > Theme Editor in your WordPress dashboard.
- Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
- From the Theme Files list, open Theme Functions (functions.php).
- Add the following code just before the closing PHP tag (?>):
function custom_author_base() {
global $wp_rewrite;
$wp_rewrite->author_base = 'members';
}
add_action( 'init', 'custom_author_base' );
- Click Update File to save the changes.
After adding this code, refresh your Permalinks by going to Settings > Permalinks and clicking Save Changes (no need to modify anything).
Example
Before adding the code:
https://example.dev/author/johndoe
After adding the code:
https://example.dev/members/johndoe
Troubleshooting and FAQs
Q: Do I need to refresh permalinks after adding the code?
A: Yes. Saving permalinks ensures the new author base is properly registered.
Q: Will this affect existing links?
A: Yes. Any old /author/ URLs will change. You may want to add redirects if the site is already live.
Q: Can I use any custom slug?
A: Yes, as long as the slug does not conflict with an existing page or custom post type.
Q: Does this work with BuddyBoss profiles?
A: This change applies to WordPress author archives only. BuddyBoss profile URLs are handled separately by the platform.