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 trialSarah Hantaah
1,540 Pointssyntax error
I'm getting a syntax error. I've checked my code compared to the lessons and ot seems to be the same?
Parse error: syntax error, unexpected ''islamic Sayings'' (T_CONSTANT_ENCAPSED_STRING) in C:\wamp\www\muslimahwebdesign\wp-content\plugins\mwdislamic-sayings\mwdislamic-sayings.php on line 29
Here is a screenshot of my code ( not sure how to add images or code here )
http://www.muslimahwebdesign.co.uk/wp-content/uploads/2015/09/syntax-error.png
2 Answers
Gene Higgins
16,582 PointsI should have put this in the Answer section, not the comment section, duh
Hi Sarah, Each parameter in your add_options_page() method should be separated by commas, so it should look like this:
add_options_page(
'Islamic Sayings Plugin',
'islamic Sayings,
'manage_options',
'etc'
);
Sarah Hantaah
1,540 PointsThanks, I stared at it for so long I completely missed it!
Gene Higgins
16,582 PointsGene Higgins
16,582 PointsHi Sarah, Each parameter in your add_options_page() method should be separated by commas, so it should look like this:
You may see this all on one line, but the commas need to be there regardless.