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

Adia Guidry
Adia Guidry
2,557 Points

Im getting an error for my functions.php and I can not find why..

It says error of '}" on line 5 Ive changed it and changed it and it still says the same error.. Do you see any errors?

<?php

function qcs_theme_style () {
    wp_enqueue_style('bootstrap_css', get_template_directory_uri() . '/css/bootstrap.css' );
    wp_enqueue_style('bootstrap_min_css', get_template_directory_uri() . '/css/bootstrap.min.css' );
    wp_enqueue_style( 'bootstrap_css','http://fonts.googleapis.com/css?family=Shadows+Into+Light+Two' );
    wp_enqueue_style('main_css', get_template_directory_uri() . '/style.css' );

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

function qcs_theme_js () {
    wp_enqueue_script('bootstrap_js', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '', true );
}

add_action('wp_enqueue_scripts', 'wpt_theme_js');

?>

Hi,

Just amended the formatting of your post above so the code is a little easier to read.

Here's how to do it if you need to in future.

-Rich

3 Answers

Hi,

Can you try removing the > from this line:

}>

which is just above this line:

add_action('wp_enqueue_scripts', 'wpt_theme_styles');

Any difference?

-Rich

Adia Guidry
Adia Guidry
2,557 Points

Thanks man!! Im good to go now!

No problem. One other thing to check is that your function name matches the one you're passing through add_action. :)

Adia Guidry
Adia Guidry
2,557 Points

ok, I will check double check that too! Thanks a lot