0

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.....) enter image description here

Thanks

1 Answer 1

1

You'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.

2
  • Hi Rick thanks for your advice that fixed the error. I have a new one now (T_STRING) with the last line. However, ..... I think I need to explore some short courses/tutorials on PHP to get more familiar with these more basic areas. Commented Mar 8, 2020 at 6:39
  • Ive been doing PHP programming for years, and I still look at the docs to get the syntax of things correct. The W3Schools is a good resource I also use; especially their 'try it yourself' where I can change the code and instantly see the results. And I use the googles/bings/ducks for issues. Glad to help. (BTW, it's always nice if you 'checkmark' the correct answer here. Shows others with similar problems what fixed your issue, and gives the answerer 'brownie points'.) Commented Mar 8, 2020 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.