Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.