我有一个示例代码:
function change_author_permalinks() {
global $wp_rewrite;
$wp_rewrite->author_base = \'u\';
$wp_rewrite->author_structure = "/" . $wp_rewrite->author_base . \'/%author%\';
add_rewrite_rule(\'u/([^/]+)/?$\', \'index.php?author_name=$matches[1]\', \'top\');
}
add_action(\'init\',\'change_author_permalinks\');
但我目前在博客上的立场是:
t%post%
(例如:www.domain.com/tauthor/username
)
我想更改为:
www.domain.com/u/username
但当运行代码时,结果是找不到页面?如何修复它?