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

Ryan Bent
Ryan Bent
6,433 Points

Why isn't my CSS showing up?

After I input everything exactly in all the files my css still doesn't show up on my wordpress custom theme.

Need code to help

Ryan Bent
Ryan Bent
6,433 Points

Okay

Here's my header file

<head>
    <title>harvard misfits</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="harvard misfits">

    <!--Bootstrap -->

    <!--Custom CSS -->


    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[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>

<body>

function file:

<?php


function theme_styles() {
    wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootsratp.min.css');


}
add_action('wp_enqueue_scripts', 'theme_styles' );



?>

2 Answers

Joakim Skansen Flatmoen
PLUS
Joakim Skansen Flatmoen
Courses Plus Student 24,223 Points

From what i can see in the code, you are trying to load : "/css/bootsratp.min.css", but you want to load : "/css/bootstrap.min.css". you can debug this issue by doing as Andrew say in the post above.

Andrew Shook
Andrew Shook
31,709 Points

Go to the site in your browser and open the console. Click on the network tab and refresh the page. This will show all the js, css, and images being loaded. Check to see if you have any errors there.