// 添加斜杠  分类页面添加"/"斜杠
function nice_trailingslashit($string, $type_of_url) {
    if ( $type_of_url != 'single' && $type_of_url != 'page' && $type_of_url != 'single_paged' )
        $string = trailingslashit($string);
    return $string;
}

    add_filter('user_trailingslashit', 'nice_trailingslashit', 10, 2);

function html_page_permalink() {
    global $wp_rewrite;
    if ( !strpos($wp_rewrite->get_page_permastruct(), '.html')){
        $wp_rewrite->page_structure = $wp_rewrite->page_structure . '.html';
    }
}    
}