I have been trying to find a solution for this for a while now with no luck... I am busy making a custom theme for WordPress as per this article. The html and php hooks like get_header() are working perfectly but as soon as I try to add style.css it doesn't work and the "demo theme" is stuck on loading.however when I remove this it works perfectly but the css in the style.css file is not loaded. these are the css files I would like to load into the page.
<link rel="stylesheet" href="http://www.website.com/wp-content/themes/canvas/css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="http://www.website.com/wp-content/themes/canvas/style.css" type="text/css" />
<link rel="stylesheet" href="http://www.website.com/wp-content/themes/canvas/css/dark.css" type="text/css" />
<link rel="stylesheet" href="http://www.website.com/wp-content/themes/canvas/css/font-icons.css" type="text/css" />
<link rel="stylesheet" href="http://www.website.com/wp-content/themes/canvas/css/animate.css" type="text/css" />
<link rel="stylesheet" href="http://www.website.com/wp-content/themes/canvas/css/magnific-popup.css" type="text/css" />
<link rel="stylesheet" href="http://www.website.com/wp-content/themes/canvas/css/responsive.css" type="text/css" />
How would I correctly load all of these css files into a WordPress page. Thanks! I am currently using the following code
define("THEME_DIR", get_template_directory_uri());
/*--- REMOVE GENERATOR META TAG ---*/
remove_action('wp_head', 'wp_generator');
// ENQUEUE STYLES
function enqueue_styles() {
/** REGISTER css**/
wp_register_style( 'bootstrap', THEME_DIR . '/css/bootstrap.css', array(), '1', 'all' );
wp_register_style( 'dark', THEME_DIR . '/css/dark.css', array(), '1', 'all' );
wp_register_style( 'font-icons', THEME_DIR . '/css/font-icons.css', array(), '1', 'all' );
wp_register_style( 'animate', THEME_DIR . '/css/animate.css', array(), '1', 'all' );
wp_register_style( 'magnific-popup', THEME_DIR . '/css/magnific-popup.css', array(), '1', 'all' );
wp_register_style( 'responsive', THEME_DIR . '/css/responsive.css', array(), '1', 'all' );
//wp_register_style( 'style', THEME_DIR . '/style.css', array(), '1', 'all' );
/** ENQUEUE css**/
wp_enqueue_style( 'bootstrap' );
wp_enqueue_style( 'dark' );
wp_enqueue_style( 'font-icons' );
wp_enqueue_style( 'animate' );
wp_enqueue_style( 'magnific-popup' );
wp_enqueue_style( 'responsive' );
//wp_enqueue_style( 'style' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_styles' );
// ENQUEUE SCRIPTS
function enqueue_scripts() {
wp_register_script( 'html5-shim', 'http://html5shim.googlecode.com/svn/trunk/html5.js', array( 'jquery' ), '1', false );
wp_enqueue_script( 'html5-shim' );
wp_register_script( 'custom-script', THEME_DIR . '/js_path/customscript.js', array( 'jquery' ), '1', false );
wp_enqueue_script( 'custom-script' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_scripts' );
But this isn't working... I have also checked that wp_head() is present in my header file and that all that php is working ??? AS soon as I add style.css It gets stuck on loading