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 trialSovathmonyvann Koch
455 Pointsmy code not working!
<?php
function theme_styles(){
wp_enqueque_style('bootstrap_css',get_template_directory_uri(). '/css/boostrap.min.css');
}
add_action('wp_enqueque_style_scripts','theme_styles');
?> i couldn't find the reason why bootstrap.min.css not linked yet i follow everthing like 3 times now still the same
6 Answers
thomas kleven
110 PointsThe video didn't say but you have to also put a call into the index.php file to call the head and footer
// hook to put into your index.php <?php wp_head(); ?>
same with where you want to have the footer appear so put the next line at the bottom of index.php <? get_footer(); ?>
Nathan Newell
7,634 PointsHey :) You'll notice that the 'style' text is removed from wp_enqueque_scripts
add_action('wp_enqueque_scripts','theme_styles');
instead of
add_action('wp_enqueque_style_scripts','theme_styles');
Sovathmonyvann Koch
455 Points<?php function theme_styles() { wp_enqueue_style( 'bootstrap_css', get_template_directory_uri().'/css/bootstrap.min.css' ); } add_action('wp_enqueue_scripts','theme_styles'); ?> still the same
Nathan Newell
7,634 Pointsdo you have
<?php wp_head(); ?>
in the head tag of your header.php?
Sovathmonyvann Koch
455 Pointsyes i do.
thomas kleven
110 PointsThe video didn't say but you have to also put a call into the index.php file to call the head and footer
// hook to put into your index.php <?php wp_head(); ?>
same with where you want to have the footer appear so put the next line at the bottom of index.php <? get_footer(); ?>
thomas kleven
110 PointsThe video didn't say but you have to also put a call into the index.php file to call the head and footer
// hook to put into your index.php <?php wp_head(); ?>
same with where you want to have the footer appear so put the next line at the bottom of index.php <? get_footer(); ?>
thomas kleven
110 PointsThe video didn't say but you have to also put a call into the index.php file to call the head and footer
// hook to put into your index.php <?php wp_head(); ?>
same with where you want to have the footer appear so put the next line at the bottom of index.php <? get_footer(); ?>