Title: Parse error: syntax error, unexpected &#039;}&#039;
Last modified: September 1, 2016

---

# Parse error: syntax error, unexpected '}'

 *  Resolved [heyyitzpat](https://wordpress.org/support/users/heyyitzpat/)
 * (@heyyitzpat)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/)
 * I’m having this issue with a theme I uploaded. It is in the themeOptions/functions.
   php file.
 * Here’s the default file:
 *     ```
       <?php
       if ( !function_exists( 'optionsframework_init' ) ) {
       /*-----------------------------------------------------------------------------------*/
       /* Options Framework Theme
       /*-----------------------------------------------------------------------------------*/
       /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */
   
       	define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
       	define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');
   
       require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
       }
       /*
        * This is an example of how to add custom scripts to the options panel.
        * This one shows/hides the an option when a checkbox is clicked.
        */
       add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
       function optionsframework_custom_scripts() { ?>
       <script type="text/javascript">
       jQuery(document).ready(function() {
       	jQuery('#example_showhidden').click(function() {
         		jQuery('#section-example_text_hidden').fadeToggle(400);
       	});
       	if (jQuery('#example_showhidden:checked').val() !== undefined) {
       		jQuery('#section-example_text_hidden').show();
       	}
       });
       </script>
       <?php
       }
       /*
        * Turns off the default options panel from Twenty Eleven
        */
       add_action('after_setup_theme','remove_twentyeleven_options', 100);
       function remove_twentyeleven_options() {
       	remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
       }
       ?>
       ```
   
 * Where is the fault?

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

 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/#post-7531335)
 * Hi heyyitzpat.
 * > I’m having this issue
 * What issue?
 * > with a theme I uploaded.
 * What theme? Where did you download it from?
 *  Thread Starter [heyyitzpat](https://wordpress.org/support/users/heyyitzpat/)
 * (@heyyitzpat)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/#post-7531336)
 * The issue is Parse error: syntax error, unexpected ‘{‘ in /home/******/public_html/
   wp-content/themes/blackfyre/themeOptions/functions.php on line 1
 * The theme is Blackfyre
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/#post-7531341)
 * Since you’re using a commercial theme we’d ask that you post your question with
   the theme vendor’s support for help with customizations and issues:
    [http://themeforest.net/item/blackfyre-create-your-own-gaming-community/10618851/support](http://themeforest.net/item/blackfyre-create-your-own-gaming-community/10618851/support).
   These forums are for support of themes available in the [wordpress.org repository](https://wordpress.org/themes/browse/popular/)
   and the volunteers on this forum don’t have access to commercial themes. Support
   for a commercial theme should have been included when the theme was purchased.
   Contacting the theme vendor also allows the developers to be aware of potential
   issues with their products.
 *  [kobashicomputing](https://wordpress.org/support/users/kobashicomputing/)
 * (@kobashicomputing)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/#post-7531342)
 * I put the above code through two PHP lint syntax checker and there were no errors
   found. In addition, I counted the number of left curly braces (6) and it matches
   with the number of right curly braces (6).
 * Maybe the problem is here:
    `require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.
   php');`
 * Comment out:
    `// require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');`
 * Replace with this:
 *     ```
       $thePath = OPTIONS_FRAMEWORK_URL . 'options-framework.php';
       echo "THE PATH IS: " . $thePath;
       require_once($thePath);
       ```
   
 * Is $thePath a valid path? Is the file you have corrupted? Delete functions.php
   and upload it again.
 *  [cedcommerce](https://wordpress.org/support/users/cedcommerce/)
 * (@cedcommerce)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/#post-7531356)
 * Hie heyyitzpat,
    The issue might be in the file that is calling “ themeOptions/
   functions.php” or in “require_once (OPTIONS_FRAMEWORK_URL . ‘options-framework.
   php’);” So please kindle provide code of that do files also. Is that theme is
   running before or from the time you installed it… it is producing the error. 
   Thanks
 *  Thread Starter [heyyitzpat](https://wordpress.org/support/users/heyyitzpat/)
 * (@heyyitzpat)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/#post-7531492)
 * > I put the above code through two PHP lint syntax checker and there were no 
   > errors found. In addition, I counted the number of left curly braces (6) and
   > it matches with the number of right curly braces (6).
   > Maybe the problem is here:
   >  require_once (OPTIONS_FRAMEWORK_URL . ‘options-
   > framework.php’);
   > Comment out:
   >  // require_once (OPTIONS_FRAMEWORK_URL . ‘options-framework.php’);
   > Replace with this:
   >  $thePath = OPTIONS_FRAMEWORK_URL . ‘options-framework.php’;
   > echo “THE PATH IS: ” . $thePath; require_once($thePath); Is $thePath a valid
   > path? Is the file you have corrupted? Delete functions.php and upload it again.
 * THIS must have fixed it. I replaced what you said to do, and now its working!!!!!!
   Thank you!!!!!!

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

The topic ‘Parse error: syntax error, unexpected '}'’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [heyyitzpat](https://wordpress.org/support/users/heyyitzpat/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-173/#post-7531492)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
