It means that you are using the wp_enqueue_style improperly.
The way it works is by using a handle name and then you use the location.
So if you wanted to use a simple CSS file:
add_action( 'wp_enqueue_scripts', 'my_css' );
function my_css(){
wp_enqueue_style( 'style-name', 'url-to-file' );
}
If you have something that requires|uses|depends on another then you can do something like:
add_action( 'wp_enqueue_scripts', 'depend_css' );
function depend_css(){
wp_enqueue_style( 'style-name', 'url-to-file' );
wp_enqueue_style( 'dependant-css', 'url-to-file', array( 'style-name' ) );
}
This is what my function.php looks like.
<?php
function salon_styles_scripts() {
wp_register_script('jquery-ui', get_stylesheet_directory_uri().'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js', array('jquery') );
wp_enqueue_script('jquery-ui');
wp_enqueue_script( 'jquery-isotope', get_template_directory_uri(). '/js/jquery.isotope.min.js', array( 'jquery' ) );
wp_enqueue_script( 'sorting', get_template_directory_uri(). '/js/sorting.js', array( 'jquery' ) );
wp_enqueue_script( 'bootstrap', get_template_directory_uri(). '/js/bootstrap.min.js', array( 'jquery' ) );
wp_enqueue_script( 'jquery-prettyPhoto', get_template_directory_uri(). '/js/jquery.prettyPhoto.js', array( 'jquery' ) );
wp_enqueue_script( 'jquery-twitter', get_template_directory_uri(). '/js/jquery.twitter.js', array( 'jquery' ) );
wp_enqueue_script( 'superfish', get_template_directory_uri(). '/js/superfish.js', array( 'jquery' ) );
wp_enqueue_script( 'jquery-flexslider', get_template_directory_uri(). '/js/jquery.flexslider-min.js', array( 'jquery' ) );
wp_enqueue_script( 'jquery-animate', get_template_directory_uri(). '/js/animate.js', array( 'jquery' ) );
wp_enqueue_script( 'myscript', get_template_directory_uri(). '/js/myscript.js', array( 'jquery' ) );
wp_register_style( 'css-salon', get_template_directory_uri().'/css/style.css');
wp_enqueue_style( 'css-salon'); //default
wp_enqueue_style( 'css-animate', get_template_directory_uri() . '/css/animate.css' ); //our stylesheet
wp_enqueue_style( 'css-bootstrap-min', get_template_directory_uri() . '/css/bootstrap.min.css' ); //our stylesheet
wp_enqueue_style( 'css-bootstrap-theme', get_template_directory_uri() . '/css/bootstrap-theme.min.css' ); //our stylesheet
wp_enqueue_style( 'css-flexslider', get_template_directory_uri() . '/css/flexslider.css' ); //our stylesheet
wp_enqueue_style( 'css-pretty-photo', get_template_directory_uri() . '/css/prettyPhoto.css' ); //our stylesheet
}
add_action('wp_enqueue_scripts','salon_styles_scripts');
?>
Thanks for your answer by the way Jose 🙂
1. Please try to use the backticks when you are posting code; if it is more than ten lines think about using pastebin.com or gist.github.com for that.
2. I want to say the issue does arise more from the header file now that I look at the code a little closer. The million dollar question is: are you using a child theme? ( If this is a custom-built theme, please disregard previous question ).
3. The cool thing about the wp_enqueue_(style|script) functions is that you don’t need to have anything on the header other than: wp_head(). The reason is because behind the scenes it will build the markup for it. So, if you are using a stylesheet it will automatically use <link rel="stylesheet" href="..."> or <script></script> for script files. 🙂
4. If you are ever lost on how the core functions work, you can always look in the developer reference site and look up how they work. 🙂
This is bootstrap theme converted into a wp theme. No child theme. I seemed to have resolved the issue somehow by editing the link in header to make it look like this.
<link href=”<?php wp_enqueue_style(‘salon_styles_scripts‘); ?>” rel=”stylesheet” type=”text/css”>