Home» »How to Fix Syntax Error in WordPress Theme

How to Fix Syntax Error in WordPress Theme

It is common in wordpress novice users, while using a new theme, especially free themes. Some people may immediately claim that the theme is broken and can not be used, but it is actually very easy to fix syntax error in wordpress, without having to switch to another theme. This error can also be caused by a plugin that you install.

To fix syntax error in wordpress theme, first you must have access to the wp-content, where the theme files saved.

To facilitate you finding out the lines of a syntax error, I suggest that you use the numbered text editor, such as notepad + +. The number I mean here are the numbers that are on the left each line syntax.

Associated with the numbers above, now I want you to find out what line and where exactly the error comes. Here is an example of the error messages that appear due to multiple functions inside functions.php file and how to solve it.


Look at the error message screenshot above. In this case the error is caused because mr_meta() previously declared on line 19 in functions.php and redeclared on line 24 in functions.php.

So to fix the error as above, you can edit the functions.php file in your theme folder, then go to line 19 or 24 to remove one of these functions.

See, it's very easy, so I hope when the error message appears you do not immediately panic and then change your theme. However, if the error comes from the wordpress plugins or other files inside the wordpress folder, you should consult to an expert on this, or you can post threat in the wordpress forum.

About Author:

Rahman Kurnia is a blogger, SEO fighter, who loves PHP, CSS, HTML and interested in js, ajax, c++ and much more. He love writing something informatif to help others, and to keep his knowledge on the internet.

Follow him @ Twitter | Facebook | Google +

0 comments:

Post a Comment

Like us on Facebook
Follow us on Twitter
Recommend us on Google Plus
Blog Widget by LinkWithin