Title: Parse error: syntax error, unexpected (line 2)
Last modified: August 21, 2016

---

# Parse error: syntax error, unexpected (line 2)

 *  [stardusty](https://wordpress.org/support/users/stardusty/)
 * (@stardusty)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/)
 * Hello! I know next to nothing about coding but tried to remove something from
   my website by changing something in function.php, based on a suggestion in another
   topic. It didn’t work, and I got this error message, and I thought I reversed
   it, but the error is still there. What’s wrong? I’m sure it’s something quite
   simple I accidentally deleted.
 * Here is the error:
 * Parse error: syntax error, unexpected ‘<‘ in /homepages/12/d344599265/htdocs/
   caggage/wordpress caggage/wp-content/themes/comicpress/functions.php on line 
   2
 * And here are the first few lines of the code:
 *     ```
       <?php 
   
       if ( ! function_exists( 'comicpress_enqueue_comment_reply' ) ) {
           function comicpress_enqueue_comment_reply() {
                   if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
                       wp_enqueue_script( 'comment-reply' );
                   }
           }
       }
       add_action( 'wp_enqueue_scripts', 'comicpress_enqueue_comment_reply' );
       // Text domain - Languages location
       load_theme_textdomain( 'comicpress', get_template_directory() . '/lang' );
       // the_post_thumbnail('thumbnail/medium/full');
       add_theme_support( 'post-thumbnails' );
       add_theme_support( 'automatic-feed-links' );
       add_editor_style();
       ```
   
 * _
    [Please use code buttons when posting code ]

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [David Choi](https://wordpress.org/support/users/wpthemes777/)
 * (@wpthemes777)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705605)
 * The code itself doesn’t seem to have any PHP syntax error
 * [http://www.piliapp.com/php-syntax-check/](http://www.piliapp.com/php-syntax-check/)
 * maybe it’s elsewhere.
 *  Thread Starter [stardusty](https://wordpress.org/support/users/stardusty/)
 * (@stardusty)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705632)
 * Hmm. Well then I don’t know what else it could be. I only added and removed something
   right after the first line. Should I copy and paste the entire thing here?
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705637)
 * You might be better off just downloading a new copy of your theme to your local
   computer and then replacing the functions.php file via FTP (or other file management
   program your host uses).
 * You should back-up your site before doing any kind of work like this.
 * Also, please see this re: posting code:
 * [http://codex.wordpress.org/Forum_Welcome#Posting_Code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
 * (You’d need to use a pastebin for a whole file…)
 *  Thread Starter [stardusty](https://wordpress.org/support/users/stardusty/)
 * (@stardusty)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705725)
 * I would do your suggestion but I can’t even log back into my account. I get the
   same error by simply going to the login page. So I don’t know which theme I was
   using.
 *  [Borko](https://wordpress.org/support/users/media-x/)
 * (@media-x)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705727)
 * did you add the exclamation mark (!) at the beginning of the function?
    The function_exists
   should look like this:
 *     ```
       <?php
       if (function_exists('FUNCTION NAME')) {
        FUNCTION_NAME();
       }
       ?>
       ```
   
 * EDIT: also remove the whitespace (at the top)
 *  Thread Starter [stardusty](https://wordpress.org/support/users/stardusty/)
 * (@stardusty)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705729)
 * I guess not? It won’t let me log in to check.
 *  [Borko](https://wordpress.org/support/users/media-x/)
 * (@media-x)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705730)
 * > There are two ways of getting files onto your site, and once there, changing
   > them.
   > 1. By using the file manager provided in your host’s control panel. Popular
   > file managers: cPanel, DirectAdmin, Plesk
   >  2.By using an FTP or SFTP client.
   > This guide will show you how to use FileZilla.
 * Read more in the [codex](http://codex.wordpress.org/FTP_Clients)
 *  [Borko](https://wordpress.org/support/users/media-x/)
 * (@media-x)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705731)
 * When you manage to access your files, first of all delete the whitespace.
 *     ```
       <?php
       (WHITESPACE!DELETE ME!)
       if ( ! function_exists( 'comicpress_enqueue_comment_reply' ) ) {
       ```
   

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Parse error: syntax error, unexpected (line 2)’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 4 participants
 * Last reply from: [Borko](https://wordpress.org/support/users/media-x/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-line-2/#post-3705731)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
