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

Kathleen Cook
Kathleen Cook
6,240 Points

Everything's blank, and I don't know why!

I've activated the WP_DEBUG and it's telling me that my functions.php file has an error on line 3.

This is the error message: "Parse error: syntax error, unexpected 'function' (T_FUNCTION) in functions.php on line 3" (I cut out the file path because it included my full name)

And my code for the functions file is this:

<? php

function glassonmars_theme_styles() {

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

add_action( 'wp_enqueue_scripts', 'glassonmars_theme_styles');


?>

1 Answer

Kathleen Cook
Kathleen Cook
6,240 Points

HAHAHA I PUT A SPACE BEFORE THE PHP

so embarrassed right now

it's working now! woohoo