• I can’t access anything on my site other than the “our team” page and I can’t even get to the wordpress page editor. I was editing the funtions.php file and continued to get this error even though as near as I can tell, there is no error in the code (I’m by no means an expert in PHP).

    Parse error: syntax error, unexpected ‘}’ in /nfs/c06/h04/mnt/93620/domains/thrive.com/html/wp-content/themes/churchope/functions.php on line 224

    Here is the code:

    // Print styles
    function th_add_styles()
    {
    	if (!is_admin())
    	{
    		wp_enqueue_style('main', get_template_directory_uri() . '/css/main.css', '', null, 'all');
    		if (!get_option(SHORTNAME."_responsive")) {
    			wp_enqueue_style('media.querias', get_template_directory_uri() . '/css/media.queires.css', '', null, 'all');
    		}
    		wp_enqueue_style('prettyphoto', get_template_directory_uri() . '/js/prettyphoto/css/prettyPhoto.css', '', null, 'all');
    	}
    
    	$custom_stylesheet = new Custom_CSS_Style();
    	$custom_stylesheet->run();
    }

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    I can understand why the site itself wouldn’t work because of an error in the php, but to not even be able to get to the wordpress site editor seems really strange.

    I will try clearing the cache in my browser and re-loading (just thought of that while I was typing this post, but just in case that doesn’t solve my problem I’m still posting this).

    I’ve already tried removing the “}”, that didn’t work and produced the same error even though there was no } in line 224. Near as I can tell, line 224 is in this area of code:

    if (!get_option(SHORTNAME."_responsive")) {
    			wp_enqueue_style('media.querias', get_template_directory_uri() . '/css/media.queires.css', '', null, 'all');
    		}
    		wp_enqueue_style('prettyphoto',

    [Ditto]

    Any help is very appreciated!!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, the code you posted doesn’t have any syntax errors. You should try checking the entire file in a editor with PHP syntax checking, like Aptana.

    Thread Starter kdfreeland

    (@kdfreeland)

    Seems I have bigger problems now – I can’t even get to my code anymore or the WordPress site editor.

    This is all that shows up when I go to my site ( http://thrive.com.s93620.gridserver.com/wp-admin/ ):

    Parse error: syntax error, unexpected ‘}’ in /nfs/c06/h04/mnt/93620/domains/thrive.com/html/wp-content/themes/churchope/functions.php on line 224

    I haven’t edited anything since my original post – at least I was able to get to some parts of my site before, now NOTHING at all 🙁

    HELP!!

    Try switching to the default theme by renaming your current theme’s folder inside wp-content/themes and adding “-old” to the end of the folder name using FTP or whatever file management application your host provides.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘php error’ is closed to new replies.