Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialIan Mackenzie
11,062 PointsProblem after adding html5_shiv and respond_js
Parse error: syntax error, unexpected 'IE' (T_STRING) in wp-content/themes/bootstrap-wp/functions.php on line 20
My functions.php code:
function theme_js() {
global $wp_scripts;
wp_enqueue_script('html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false );
wp_enqueue_script('respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false );
$wp_scripts->add_data(‘html5_shiv’, ‘conditional’, ‘lt IE 9’);
$wp_scripts->add_data(‘respond_js’, ‘conditional’, ‘lt IE 9’);
}
add_action('wp_enqueue_scripts', 'theme_js');
1 Answer
Ryan Field
Courses Plus Student 21,242 PointsHi, Ian. It looks like you have some funny single quotes around html5_shiv
and respond_js
as well as all of the other quotes in those two lines. Try changing them all to normal quotes ('
) and see if that helps.
Ian Mackenzie
11,062 PointsIan Mackenzie
11,062 PointsThat did the trick thank you Ryan :-)