// 页面链接添加html后缀 放在functions.php中
add_action('init', 'html_page_permalink', -1);
function html_page_permalink() {
global $wp_rewrite;
if ( !strpos($wp_rewrite->get_page_permastruct(), '.html')){
$wp_rewrite->page_structure = $wp_rewrite->page_structure . '.html';
}
}
wordpress页面后缀添加.html代码
最新推荐文章于 2024-07-07 06:15:00 发布