I have been following along a basic tutorial on creating a simple theme structure. I have searched quite a few articles to get an understanding and looked at debugging tips, however I am at a loss, probably due to me limited knowledge base. At this stage I had downloaded bootstrap css and js folders. This is on a local server and I don't have any plugins installed or activated.
After quite a number of error messages I have come down to this one. Sorry, I don't remember what changes I made in the functions file to get to this one.
Parse error: syntax error, unexpected ',' in D:\xampp\htdocs\myih\wp-content\themes\mytheme\functions.php on line 8 (line 8 starts at wp_register.....)
Thanks
I have been following along a basic tutorial on creating a simple theme structure. I have searched quite a few articles to get an understanding and looked at debugging tips, however I am at a loss, probably due to me limited knowledge base. At this stage I had downloaded bootstrap css and js folders. This is on a local server and I don't have any plugins installed or activated.
After quite a number of error messages I have come down to this one. Sorry, I don't remember what changes I made in the functions file to get to this one.
Parse error: syntax error, unexpected ',' in D:\xampp\htdocs\myih\wp-content\themes\mytheme\functions.php on line 8 (line 8 starts at wp_register.....)
Thanks
Share Improve this question edited Mar 8, 2020 at 3:05 banda asked Mar 8, 2020 at 2:58 bandabanda 32 bronze badges1 Answer
Reset to default 1You've got unbalanced and improperly placed closing parenthesis. There shouldn't be the closing parenthesis after the 'stylesheet'
.
Because the closing parenthesis is there, the PHP processor thought that was the end of the function's parameters. Which caused the comma character after that to cause the error.
Watch the balancing of your parenthesis (and quotes) as you are writing your code.