Title: Please Help &#8212; Parse error: syntax error, unexpected &#039;?&#039; in&#8230;.
Last modified: August 21, 2016

---

# Please Help — Parse error: syntax error, unexpected '?' in….

 *  Resolved [krisztian79](https://wordpress.org/support/users/krisztian79/)
 * (@krisztian79)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-in/)
 * Ok, to start… I am somewhat computer savvy, but not good with code etc.
    So, 
   in order to get a better speed score on my site, I found directions on how to
   Remove Query strings from Static Resources by entering this string of code into
   my theme’s function file (Appearance > Editor > Functions.php.
 * Code is :
    function _remove_script_version( $src ){ $parts = explode( ‘?ver’,
   $src ); return $parts[0]; } add_filter( ‘script_loader_src’, ‘_remove_script_version’,
   15, 1 ); add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 );
 * After I inserted that and clicked update, my website ‘broke’… just keep getting
   a message:
 * Parse error: syntax error, unexpected ‘?’ in /home/d4niel/artwork-photography.
   com/wp-content/themes/krisztian/functions.php on line 22
 * So I erased the code, but I still get the same error even though basically undid
   my paste so… nothing should be different.
 * Here is the code now:
 * <?php
    if ( function_exists(‘register_sidebar’) ){
 * // This theme uses wp_nav_menu() in 2 locations.
    add_action( ‘init’, ‘register_my_menus’);
   function register_my_menus() { register_nav_menus( array( ‘menu-1’ => __( ‘Menu
   1’ ) ) ); }
 * }
    ?>
 * And my website is :
    artwork-photography.com/
 * Please help

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

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-in/#post-4414433)
 * Do you have a backup of your theme files? You need to replace that file with 
   a backup copy using FTP or Cpanel – since your admin access is not functional.
 *  Thread Starter [krisztian79](https://wordpress.org/support/users/krisztian79/)
 * (@krisztian79)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-in/#post-4414435)
 * Thanks for the quick response;
    So my friend originally set up this website for
   me. Since then, I’ve able to do all the tweaking and editing and content management
   myself… but only through the wordpress admin site. I’m not sure how he originally
   wrote the code or if he has a backup. Is that the only way to fix this? It seems
   strange that adding some code and then taking it back out would make my entire
   site not function. Let me know if there is some other way; meanwhile I’ll get
   a hold of the original developer.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-in/#post-4414466)
 * >  It seems strange that adding some code and then taking it back out would make
   > my entire site not function.
 * I’m guessing that the code is not actually changed back – since the error is 
   showing up on the front side of your site. Once the site has gone down, you can’t
   change that code back from the admin area. You’ll need to access the site using
   FTP or Cpanel to fix that problem.
 *  Thread Starter [krisztian79](https://wordpress.org/support/users/krisztian79/)
 * (@krisztian79)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-in/#post-4414504)
 * Ahh… ok. I think that was the issue WPyogi. Thanks.
    My developer went in and
   changed the code. Thanks a lot for the tips.

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

The topic ‘Please Help — Parse error: syntax error, unexpected '?' in….’ is closed
to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [krisztian79](https://wordpress.org/support/users/krisztian79/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-in/#post-4414504)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
