我已将此添加到我的functions.php页面:
function custom_rewrite_basic() {
add_rewrite_rule('^leaf/([0-9]+)/?', 'index.php?page_id=$matches[1]', 'top');
}
add_action('init', 'custom_rewrite_basic');
但是当我去http://example.com/leaf/1234时,我会得到一个时髦的404页面。有谁知道发生了什么事?