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

Nathalie C
Nathalie C
2,594 Points

Corrections to 'How To Build a WordPress Theme'

I've spotted a few errors which have been notified to the Treehouse Team. Here are the corrections for your info too:

Nathalie C
Nathalie C
2,594 Points

The first is here in 'Converting static html into wordpress templates' - coding the header and footer templates - with the video link -

http://teamtreehouse.com/library/how-to-build-a-wordpress-theme/converting-static-html-into-wordpress-templates/coding-the-header-and-footer-templates-2

The video mentions the <hgroup> tag around 1:10 which has been removed from html5 specification.

3 Answers

Nathalie C
Nathalie C
2,594 Points

The next is here in 'Preparing to Code WordPress Templates' - Linking Javascript - with the video link -

http://teamtreehouse.com/library/how-to-build-a-wordpress-theme/preparing-to-code-wordpress-templates/linking-javascript-2

I couldn't get my own javascript file to work, I was getting the error 'typeerror $ is not a function wordpress'

I traced it back to the instructions for the theme.js file, which I think should be:

jQuery(document).ready(function($) {
$('.flexslider').flexslider();
});

rather than:

jQuery(document).ready(function($)) {
$('.flexslider').flexslider();
}

As soon as I wrapped my javascript with:

jQuery(document).ready(function($) {

// My Code here using jQuery $
});

rather than:

jQuery(document).ready(function($)) {

// My Code here using jQuery $
}

it worked.

Ilja Daderko
Ilja Daderko
8,953 Points

Not sure about others, but I'm pretty sure you do need to use }); instead of } as you must close .ready() parameter as well as the function.

Nathalie C
Nathalie C
2,594 Points

The third is here - 'Convert Blog Listings and Single Post Templates' - with the video link:

http://teamtreehouse.com/library/how-to-build-a-wordpress-theme/converting-static-html-into-wordpress-templates/convert-blog-listing-and-single-post-templates-2

Around 1:53 mark it displays the content-post.php download file on screen.

On line 3 of the code displayed for the content-post.php file, the <h3> tag is incorrectly closed with an </h> tag which should be corrected to </h3>

The error is on the associated zip file too.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Thanks so much for these! We went back and updated all the project download files. Unfortunately haven't had a chance to upload the videos..

Please let us know if you see more fixes that are needed!