我正在使用添加菜单页面功能为我的WordPress主题添加某种欢迎页面。有什么方法可以不使用内联样式来设置页面中的内容样式, 还是出于错误的目的使用添加菜单页面?
#1
是的, 这很简单。这是我要做的:
- 创建CSS文件
- 使用admin_enqueue_scripts(使用来自WP Stack Exchange的此答案之类的代码)使CSS文件入队。
在此重复该代码, 以防其他答案被删除:
function my_admin_enqueue( $hook_suffix ) {
if( 'appearance_page_theme-options' === $hook_suffix ) {
wp_enqueue_style('my-theme-settings', get_template_directory_uri() . '/styles/theme-settings.css');
}
}
add_action( 'admin_enqueue_scripts', 'my_admin_enqueue', 10 );
来源:
https://www.srcmini02.com/63629.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_37602.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57