WordPress的URL地址http转https后资源文件无法正常显示的解决办法:
1.找到当前运行的主题所在目录如:wp-content/themes/wordstar/ 打开functions.php文件,在

require get_template_directory() . '/inc/main-funtions.php';

之前加入如下代码

add_filter('script_loader_src', 'agnostic_script_loader_src', 20,2);
function agnostic_script_loader_src($src, $handle) {
    return preg_replace('/^(http|https):/', '', $src);
}

add_filter('style_loader_src', 'agnostic_style_loader_src', 20,2);
function agnostic_style_loader_src($src, $handle) {
    return preg_replace('/^(http|https):/', '', $src);
}

wordpress管理后台修改找到wp-includes/functions.php打开它,在

require( ABSPATH . WPINC . '/option.php' );

后加入

add_filter('script_loader_src', 'agnostic_script_loader_src', 20,2);
function agnostic_script_loader_src($src, $handle) {
    return preg_replace('/^(http|https):/', '', $src);
}