WordPress标签HTML化,代码如下,添加到functions执行代码:
<code class="language-none">// html链接化
function html_url_rules() {
global $wp_rewrite;
$wp_rewrite->page_structure = $wp_rewrite->root . 'page/%pagename%.html';
$wp_rewrite->extra_permastructs['post_tag']['struct'] = $wp_rewrite->root . 'tag/%post_tag%.html';
}
add_action( 'init', 'html_url_rules' );
</code>