adding custom stylesheet to wp-admin
Question
im having troubles getting my custom stylesheet work on WP-ADMIN area.
plugins_url('style.css', __FILE__) );
do i have to create folder in my plugins named css or do i just copy my .css
to the wp-admin/css
directory?
i tried both it doesnt seem to work for me.
and what values should be replaced to __FILE__
?
sorry im kinda new to these stuff.
/*ADDS STYLESHEET ON WP-ADMIN*/
add_action( 'admin_enqueue_scripts', 'safely_add_stylesheet_to_admin' );
function safely_add_stylesheet_to_admin() {
wp_enqueue_style( 'prefix-style', plugins_url('style.css', __FILE__) );
}
/*ADDS MY CUSTOM NAVIGATION BAR ON WP-ADMIN*/
add_action('admin_head', 'custom_nav');
function custom_nav(){
include('custom_nav.html');
}
0
css, wp-admin
3 years
2020-04-03T08:50:56-05:00
2020-04-03T08:50:56-05:00 0 Answers
75 views
0
Leave an answer