I'm creating a new custom Wordpress Theme and I'm trying to add Boostrap CSS to the admin area, but it's only working when I add style.css to the admin area as well. The Boostrap js it is getting add to the admin area but the CSS is not, how do I add Bootstrap CSS without adding the style.css to the admin area?
this is my function.php
<?php
/*
* Function to register bootstrap css style
*/
function bootstrap_enqueue_styles() {
wp_register_style('bootstrap', get_template_directory_uri().'/bootstrap/css/bootstrap.min.css');
}
/*
* Function to register theme css style
*/
function main_enqueue_style(){
$dependencies = array('bootstrap');
wp_enqueue_style('main-css-style', get_stylesheet_uri(), $dependencies);
}
/*
* Function to register Bootstrap javascript
*/
function bootstrap_enqueue_scripts() {
$dependencies = array('jquery');
wp_enqueue_script('bootstrap', get_template_directory_uri().'/bootstrap/js/bootstrap.min.js', $dependencies, '3.3.6', true );
}
add_action( 'wp_enqueue_scripts', 'bootstrap_enqueue_styles' );
add_action( 'wp_enqueue_scripts', 'main_enqueue_style' );
add_action( 'wp_enqueue_scripts', 'bootstrap_enqueue_scripts' );
add_action( 'admin_init', 'bootstrap_enqueue_styles' );
add_action( 'admin_init', 'bootstrap_enqueue_scripts' );
//add_action( 'admin_init', 'main_enqueue_style' ); <-- IF I DONT ADD THIS ONE IT DOESNT ADD BOOTSTRAP CSS TO THE ADMIN AREA