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

Jerôme Naglé
Jerôme Naglé
14,189 Points

Problem with loading css wordpress themedevelopment course

Hi,

I'm following the wordpress theme development course. Everything works fine until I started with the wp loop.

At the begin I load my different styles in functions.php by making a function. The foundation.css isn't loading while my main style.css does.

my directory contains the .php files and then have a /css map with the .css files.

I'm typing EXACTLY the same as in the video, I don't understand why it loads my style.css but doesn't load my foundation.css

Here is my code from functions.php:

<?php

function wpt_theme_styles(){

//    wp_enqueue_style('normalize_css', get_template_directory_uri() . '/css/normalize.css');
wp_enqueue_style('googlefont_css', 'http://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic');
wp_enqueue_style('foundation_css', get_template_directory_uri() . '/foundation.css');
wp_enqueue_style('main_css', get_template_directory_uri() . '/style.css');

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

2 Answers

Jerôme Naglé
Jerôme Naglé
14,189 Points

For someone who has te same problem... I openend the original foundation.css and copied all the text and pasted it in a new file called foundation.css and replaced it by the original one. It worked.

Problem solved!

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Try adding /css/ before the foundations.css. According to what you wrote the foundation css file should be in the root directly since you don't say anywhere to look in the css folder.