我有一个带有子主题的WordPress主题。编辑并保存子样式表后, 看不到更改。查看源代码, 即会加载样式表, 但最后带有以下版本:style.css?ver = 4.9.7
现在, 样式在我加载style.css时显示, 但显示带有注释的空文件(第一次获得主题时为原始文件)style.css?ver = 4.9.7
我了解鼓励在子主题中使用自定义样式, 但是WordPress为什么不支持此样式?
任何建议或帮助, 表示赞赏。谢谢。
#1
此版本添加在function.php文件中, 请先检查
像这样在function.php上更好的入队样式
function child_themes_styles() {
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array(), wp_get_theme()->get('Version'));
}
add_action( 'wp_enqueue_scripts', 'child_themes_styles' );
来源:
https://www.srcmini02.com/66394.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_40508.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57