I am following along with this tutorial.
I am trying to link the javascript and css files that are usually linked in the header using wp_enqueue_scripts
in functions.php
. With what I have now, only a blank white page is loading.
functions.php
<?php
// Add scripts and stylesheets
function blogtheme_scripts() {
wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css', array() );
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.6' );
wp_enqueue_style( 'blog', get_template_directory_uri() . '/css/blog.css' );
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.3.6', true );
wp_register_style('OpenSans', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800');
wp_enqueue_style( 'OpenSans');
}
add_action( 'wp_enqueue_scripts', 'blogtheme_scripts' );
// WordPress Titles
add_theme_support( 'title-tag' );
?>
header.php
I commented out the html links because I figured they weren't supposed to be in there once I linked to them in functions.php
:
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<!-- Bootstrap core CSS -->
<!--<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">-->
<!-- Custom styles for this template -->
<!--<link href="<?php bloginfo(//'template_directory');?>/blog.css" rel="stylesheet">-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<?php wp_head();?>
</head>
The page just loads as a white page, I'm assuming it's because something is wrong with the linking, and I don't see any errors in the console.
Could it be an issue with the versions of the scripts - 3.3.6
?