The Man Who's Walking
“There are few things more pathetic than those who have lost their curiosity and sense of adventure, and who no longer care to learn.”

WordPress修改css样式无效

直接在fuction.php后面加入以下代码

add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_uri(), NULL, filemtime( get_stylesheet_directory() . '/style.css' ) );
}

Share

You may also like...

发表评论