Title: Help!: Parse error: syntax error, unexpected &#039;:&#039;
Last modified: August 21, 2016

---

# Help!: Parse error: syntax error, unexpected ':'

 *  [alosafound](https://wordpress.org/support/users/alosafound/)
 * (@alosafound)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/help-parse-error-syntax-error-unexpected-3/)
 * I am using the Switch theme and had read that the only way to slow down the homepage
   sliders was to edit the PHP code. I copy/pasted the original code into a Word
   document, and started experimenting in the editor. I couldn’t get anything to
   work so I decided to just restore the original code and move on, but then I couldn’t
   get the original code to work! I get the following error message:
 * Parse error: syntax error, unexpected ‘:’ in /home/alosaadmin/alosafoundation.
   dreamhosters.com/wp-content/themes/switch/includes/theme-scripts.php on line 
   37
 * I’ve been over it a bunch of times and cannot for the life of me figure out what
   is the problem. I’ve pasted in the code for this below. Any help would be MUCH
   appreciated! Thank you!!
 *     ```
       <?php
   
       /*---------------------*/
       /* Enqueue JavaScript / CSS for the front-end
       /*---------------------*/
   
       function switch_enqueue_scripts() {
   
       	if (is_admin()) return;
   
       	wp_enqueue_script('jquery');
       	wp_enqueue_script('mediaqueries-js', SCRIPTS_URL . '/mediaqueries.js');
       	wp_enqueue_script('jqueryui-js', SCRIPTS_URL . '/jquery.ui.js', 'jquery', false, true);
       	wp_enqueue_script('superfish-js', SCRIPTS_URL . '/jquery.superfish.js', 'jquery', '1.4.8', true);
       	wp_enqueue_script('supersubs-js', SCRIPTS_URL . '/jquery.supersubs.js', 'jquery', '0.2', true);
       	wp_enqueue_script('flexslider-js', SCRIPTS_URL . '/jquery.flexslider.js', 'jquery', '1.8', true);
       	wp_enqueue_script('roundabout-js', SCRIPTS_URL . '/jquery.roundabout.js', 'jquery', '2.4', true);
       	wp_enqueue_script('caroufredsel-js', SCRIPTS_URL . '/jquery.caroufredsel.js', 'jquery', '5.5.5', true);
       	wp_enqueue_script('fancybox-js', SCRIPTS_URL . '/jquery.fancybox.js', 'jquery', '1.3.4', true);
       	wp_enqueue_script('imagesloaded-js', SCRIPTS_URL . '/jquery.imagesloaded.js', 'jquery', '2.0.1', true);
       	wp_enqueue_script('isotope-js', SCRIPTS_URL . '/jquery.isotope.js', 'jquery', '1.5.18', true);
       	wp_enqueue_script('fitvids-js', SCRIPTS_URL . '/jquery.fitvids.js', 'jquery', '1.0', true);
       	wp_enqueue_script('tiptip-js', SCRIPTS_URL . '/jquery.tiptip.js', 'jquery', '1.3', true);
       	wp_enqueue_script('theme-js', SCRIPTS_URL . '/theme.js', 'jquery', '1.0', true);
   
       }
   
       add_action('wp_enqueue_scripts', 'switch_enqueue_scripts');
   
       /*----------------------------*/
       /* Enqueue JavaScript / CSS for the admin
       /*-----------------------------*/
   
       function switch_admin_scripts() {
   
       	wp_enqueue_script('jquery');
   
       	wp_enqueue_script('widgets-js', INCLUDES_URL . '/widgets/widgets.js', 'jquery', '1.0', true);
       	wp_enqueue_style('widgets-css', INCLUDES_URL .'/widgets/widgets.css');
   
       }
   
       add_action('admin_enqueue_scripts', 'switch_admin_scripts');
   
       ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/help-parse-error-syntax-error-unexpected-3/#post-4001185)
 * > . I copy/pasted the original code into a Word document
 * No! You should _never_ use Word for PHP work. You must use a plain text editor
   such as Notepad. Re-upload a fresh copy of the theme using FTP.

Viewing 1 replies (of 1 total)

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

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/help-parse-error-syntax-error-unexpected-3/#post-4001185)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
