0
URLがあるWordpressの書き換えURLがカスタムテンプレートに取り組んでいない
add_filter('query_vars', 'wpse12965_query_vars');
function wpse12965_query_vars($query_vars)
{
$query_vars[] = 'var1';
return $query_vars;
}
add_action('init', 'wpse12065_init');
function wpse12065_init()
{
add_rewrite_rule(
'custom(/([^/]+))?/?',
'index.php?pagename=custom&var1=$matches[1]',
'top'
);
}
しかし、それでも404エラーを返します。私は間違って何をしていますか?
ありがとうございます! – Jappan