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 How to Build a WordPress Plugin Building a WordPress Plugin Settings Page How to Create a Plugin Template with a Settings Page

Sarah Hantaah
Sarah Hantaah
1,540 Points

syntax 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

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'
);

You may see this all on one line, but the commas need to be there regardless.

2 Answers

I 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
Sarah Hantaah
1,540 Points

Thanks, I stared at it for so long I completely missed it!