Title: Parse Error in functions.php
Last modified: August 31, 2016

---

# Parse Error in functions.php

 *  [peachesandguacamole](https://wordpress.org/support/users/peachesandguacamole/)
 * (@peachesandguacamole)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/parse-error-in-functionsphp-4/)
 * Hi all.
    Hoping you can help.
 * I added some code to the functions.php file but on updating the file in WordPress
   I just get the error message:
    Parse error: syntax error, unexpected ‘<‘ in functions.
   php on line 28
 * I’ve deleted the code I entered and tried to resave and I still get the same 
   error.
 * I’ve also deleted the file through FTP and replaced it with a backup version 
   of the file and still the error message remains. The whole site isn’t displaying
   and it looks like WordPress must have automatically edited some code elsewhere
   as replacing the file with the backup version still doesn’t help.
 * Can anyone shed any light on this bizarre situation?

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

 *  [Joms](https://wordpress.org/support/users/jomsky/)
 * (@jomsky)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/parse-error-in-functionsphp-4/#post-7016644)
 * First make sure that the backup does not have the same problem and is being restored
   correctly i.e it uploads and replaces the problematic file.
 * There seems to be a problem with your opening and closing PHP tags: `<?php` and`?
   >`. Most common problem is missing a closing PHP tag and writing HTML next to
   it. Start looking for the problem around line 28 as stated by the error.
 *  Thread Starter [peachesandguacamole](https://wordpress.org/support/users/peachesandguacamole/)
 * (@peachesandguacamole)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/parse-error-in-functionsphp-4/#post-7016647)
 * Thanks.
    I’m stumped, line 28 doesn’t even exist. it finishes on line 26.
 * Line 28 was the first line of the new code I entered, but for some reason replacing
   it with the backed up functions.php file isn’t fixing the problem.
 * I’m using Cyberduck FTP to put the files back, and it’s in the child theme folder.
   
   is it possible WP has made edits elsewhere?
 * here’s the contents of the functions.php file
 * <?php
 * // ==========================================================================
   ===
    // FUNCTIONS.PHP // —————————————————————————– // Overwrite or add your 
   own custom functions to X in this file. // ==================================
   ===========================================
 * // ==========================================================================
   ===
    // TABLE OF CONTENTS // —————————————————————————– // 01. Enqueue Parent
   Stylesheet // 02. Additional Functions // ===================================
   ==========================================
 * // Enqueue Parent Stylesheet
    // ============================================
   =================================
 * add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );
 * // Additional Functions
    // =================================================
   ============================
 *  [Joms](https://wordpress.org/support/users/jomsky/)
 * (@jomsky)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/parse-error-in-functionsphp-4/#post-7016688)
 * It’s highly unlikely that WP will make file changes unless you or the theme coded
   it to do so. Do you still have the piece of code that you added?
 * Also, can you try downloading the functions.php file from your FTP and see if
   the code you added has really been removed? If the content is the same like what
   you posted then it might be referring to the functions.php file of your parent
   theme, so you can check that as well.
 *  [evelynworks](https://wordpress.org/support/users/evelynworks/)
 * (@evelynworks)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/parse-error-in-functionsphp-4/#post-8560527)
 * Did you ever figure out how to fix this? I’m having the same issue–I replaced
   the file with a fresh one a number of times. Getting the same syntax error for
   a line that doesn’t exist.

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

The topic ‘Parse Error in functions.php’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [evelynworks](https://wordpress.org/support/users/evelynworks/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/parse-error-in-functionsphp-4/#post-8560527)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
