Tạo và đưa Css vào WordPress Admin - Define and apply custom css on Wordpress Admin css
Posted: Wed Jan 11, 2017 3:51 am
1) Define 'admin.css' file on 'DocumentRoot/wp-content/themes/yourtheme/css' folder
2) Apply that css on 'DocumentRoot/wp-content/themes/yourtheme/function.php'
3) Check and see that css effect on WP Admin. Success!
Without change on original css files such as DocumentRoot/wp-admin/css/wp-admin.min.css , wp-admin-rtl.min.css - as will more css files which are using on WP Admin depend you see.
Code: Select all
/** Update CSS within in Admin **/
@media only screen and (max-width: 1172px)
{
input.data[type=text], textarea.data {
width: 100%;
}
}
@media only screen and (max-width: 782px) {
input.data[type=text], textarea.data {
width: 100%;
}
}
Code: Select all
/* Update CSS within in Admin */
function admin_theme_style() {
//die(get_template_directory_uri().'/css/admin.css')
wp_enqueue_style('custom-admin-style', get_template_directory_uri().'/css/admin.css');
}
add_action('admin_enqueue_scripts', 'admin_theme_style');
Without change on original css files such as DocumentRoot/wp-admin/css/wp-admin.min.css , wp-admin-rtl.min.css - as will more css files which are using on WP Admin depend you see.