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 trial

WordPress From Bootstrap to WordPress Setup a Bootstrap Theme Add Bootstrap CSS via the functions.php File

OMG CAN SOMBODY HELP US?

GUYS I AM EXPERIENCING THE SAME PROBLEM LIKE 5 PEOPLE DO, AND THERE IS NO ANSWER TO IT.

I GOTTA SAY YOU GUYS DID A GREAT JOB WITH THE LESSONS, VIDEOS BUT THE SUPPORT SYSTEM IS MESSED UP.

LIKE 5 PEOPLE ARE SAYING THERE ARE PROBLEMS WITH THE CODING AND THERE IS NO ACTUAL ANSWER.

I HAVE THE SAME ISSUE I DID THE EXACT! SAME THING ON THE VIDEO BUT MY CODES ARE NOT WORKING THE SAME WAY AS ZAC'S. AFTER IMPLYING CODING THERE ARE SOME IMPROVMENT ON THE SITE BUT IT IS NOT WORKING PROPERLY.

HERE İS how ıt looks http://i.hizliresim.com/AJYAWz.png

4 Answers

Cadie Brown
Cadie Brown
3,303 Points

I was having the same issue, and I checked some WordPress documentation (https://developer.wordpress.org/themes/basics/including-css-javascript/) and everything in my code looked correct. I thought it might be something within the actual CSS file, because some of the styles were loading but not all. I went to the Bootstrap Jumbotron Example site (http://getbootstrap.com/examples/jumbotron/#) and viewed the source code to open the CSS file that was linked to that page (http://getbootstrap.com/dist/css/bootstrap.min.css). I selected everything in that file and pasted it over everything that was in my bootstrap.min.css and saved. When I reloaded my WP site it worked! So there must be differences between the example page on Bootstrap and the css files that come with the a bootstrap download. Hope this helps :)

Aaron Duke-Wood
Aaron Duke-Wood
13,526 Points

Thanks for this, taken me a while trying to get the Bootstrap 4 version working for this course... The Navbar wasn't displaying correctly. I ended up following the links above and reverting to the older version of bootstrap! :)

Konrad Pilch
Konrad Pilch
2,435 Points

Hey, just to let you know, syntax and coding change over time, so you better look for documentation about the same thing. The code that worked yesterday might not work today. Check the docs for it.

Hello,

Not sure if you're still stuck on this, but I took a look at your code and you need to remove the /css from the path to the style.css.

Style.css isn't in a separate 'css' folder like the bootstrap.min.css. To clarify, your wp_enqueue_style should look a bit like this:

wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );

Hope this helps :)

In my case, following code seems to work just fine for me

wp_enqueue_style( 'style', get_stylesheet_uri() );