I am currently viewing members details using author.php - it all works perfectly but i want to change the /author permalink to /member. Ive done this but it takes me to a 404 page now.
add_action('init','change_author_permalinks');
function change_author_permalinks()
{
global $wp_rewrite;
$wp_rewrite->author_base = 'member'; // Change 'member' to be the base URL you wish to use
$wp_rewrite->author_structure = '/' . $wp_rewrite->author_base. '/%author%';
}
Login and go to the dashboard.
Then go to Settings > Permalinks
and save the page. That flushes the rewrite rules and should then take you to the correct page when entering the new URL.
You could also use flush_rewrite_rules()
but you should use that function sparingly and only when you need to. Saving the Permalinks page is the easiest way to go so you're not flushing the cache constantly.
This plugin may help: https://wordpress.org/plugins/edit-author-slug/
I used on several sites and never had an issue ;)
Be sure to save your permalinks (Settings > Permalinks) after any slug update.
I actually just built a plugin to address this very issue. It allows you to change the author url to anything at all. It effectively changes the link shown on the posts, and also redirects any old author pages. Can be specified per user or globally.
https://wordpress.org/plugins/wp-custom-author-url/
Hope this helps!