我想搜索以下可搜索的档案:
Default Search:
/search/{keyword} -> search.php -> get_template_part(\'archive-default-search\');
Default Custom Archive:
/support -> archive-support.php
Mixed:
/support/search/{keyword} -> search.php -> get_template_part(\'archive-support-search\');
我无法做到这一点。我该怎么做?
add_action( \'init\', function() {
add_rewrite_rule( \'/(.+)/search/(.+)/?$\', \'index.php?post_type=$matches[1]&s=$matches[2]\', \'top\' );
} );