Hi
I use this snippet for static pages as Author Archives.
add_filter('request', function( array $query_vars ) {
// if ( is_admin() ) {
// return $query_vars;
// }
if ( isset( $query_vars['author_name'] ) ) {
$pagename = $query_vars['author_name'];
$query_vars = array( 'pagename' => "$pagename" );
}
return $query_vars;
} );
It worked great for me, but not when there is one user, he is both an administrator and a post author.
(I deleted my other users: I had created several with different e-mails, and changed the authors of the posts)
My posts and WPSP posts lists author links returns https://www.sisla.lt/author/admin/
but not https://www.sisla.lt/rolandas-sisla/ author page link.
(I use GP PRO and WP Show Posts Pro, both latest versions)
Maybe you can advise what to do?