In WordPress, the author page link will follow this instruction:
https://website.com/ + author + yourusername
For example https://wilcity.com/author/admin
Sometimes, you want to rename
- Log into your site account
- Activate Wilcity Child
- Put the following code to functions.php of Child Theme: Appearance -> Editor -> functions.php
add_action('init', function(){ global $wp_rewrite; $author_slug = 'thelister'; // change slug name $wp_rewrite->author_base = $author_slug; }); add_action('init', function(){ add_rewrite_rule('^thelister/([^/]+)/([^/]+)/?$', 'index.php?author_name=$matches[1]&mode=$matches[2]', 'top'); }, 10, 0); add_filter('wilcity/filter_author_mode', function(){ return 'thelister'; });
- Finally, click on Settings -> Permalinks -> Re-save Post Name. Now https://wilcity.com/author/admin will be changed to https://wilcity.com/thelister/admin