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

PHP

April Carter
April Carter
15,568 Points

Jumbotron Styles "From Boostrap to Wordpress"

In the stage one video "Add Bootstrap CSS via the functions.php File", we are supposed to have copied and pasted the source code for the Jumbotron Bootstrap example, separated the header and footer from the index.php file, and included them.

I have done that, and everything works perfectly up to the point when I am adding the styles. This is the one function I have written so far.

<?php

function theme_styles() {
    wp_enqueue_style('bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css');
}
add_action('wp_enqueue_scripts', 'theme_styles');

?>

All files are in the correct folders, and the wp_head() function is in the correct spot. I've done this with other Bootstrap examples before, and they all worked perfectly. All styles were included properly. However, with Jumbotron, it's obvious the styles are being included, but not all of them. Buttons are formatted and colored, text is aligned differently, links have had decorations removed. However, other styles are very conspicuously missing. I've started over from scratch twice, and it always turns out the same. It's like I accidentally deleted some of the styles from the stylesheet, but I never even opened it since the last time I used it and I have downloaded a new copy from Bootstrap both times I started over. So I couldn't have changed any of the styling code.

I've spent hours on this one video trying to figure out what's wrong and am at the end of my rope. I even went all the way to including the JS IE10 Windows 8 workaround present in the original code, as I am working in Windows 8, with no luck.

Andrew Shook
Andrew Shook
31,709 Points

Did you download a custom boostrap?

April Carter
April Carter
15,568 Points

No, I was using other examples from the same page as the one we were supposed to use for the course.

1 Answer

April Carter
April Carter
15,568 Points

Well, since the other Bootstrap framework examples worked fine through all steps, I have decided to move on with the confidence that I have grasped the subject matter at hand. I was hoping figuring this out would give me a little extra knowledge, but whatever is affecting the Jumbotron framework to keep the styles from showing properly can wait. I'm almost done with the Wordpress Development track, and will put what I learned to work very soon after I finish. Treehouse is awesome! :D