给WordPress后台页面添加自定义CSS
目录
add_action('admin_head', 'my_custom_fonts'); // admin_head is a hook my_custom_fonts is a function we are adding it to the hook function my_custom_fonts() { echo '<style> .vi-ui.segment{display:none;} </style>'; }
/* Add CSS file(s) to admin pages.*/ function admin_style() { wp_enqueue_style('admin-styles', get_theme_file_uri().'/style.css'); //获取子主题目录下CSS文件 } add_action('admin_head', 'admin_style');