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

PHP

WordPress Parse Error

I'm trying to follow along with the custom post type tutorial here http://blog.teamtreehouse.com/create-your-first-wordpress-custom-post-type. After attempting to complete the very first step I'm getting this error

Parse error: syntax error, unexpected '=', expecting ')' in /home/martyr13/public_html/intellectualsavage.info/wp-content/themes/arras/functions.php on line 73

This is very annoying, because I followed the instructions. i added this to my code. i definitely did not do anything to the code that already existed. Furthermore, I can't get rid of this message even if I add a completely new copy of my functions.php

2 Answers

Randy Hoyt
STAFF
Randy Hoyt
Treehouse Guest Teacher

The problem is that the code in the blog post is not escaped correctly. Where the code in the blog post has this ...

'name' => 

... it should have this:

'name' =>

Does that help?

That does help, thank you. I abandoned the treehouse tutorial and found a smashing magazine tutorial that had the correct code, and I see that the difference between the two is exactly what you said.