Title: Please help! Parse error: syntax error, unexpected T_IF
Last modified: August 21, 2016

---

# Please help! Parse error: syntax error, unexpected T_IF

 *  Resolved [KingKris89](https://wordpress.org/support/users/kingkris89/)
 * (@kingkris89)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-t_if/)
 * So, I tried venturing into and editing part of the theme code… I added something
   in at the very bottom, it didn’t work and I took it off. I don’t know how to 
   do this at all. Now the website won’t work at all and I am afraid to walk away
   not knowing how to log in.
 *     ```
       <?php
   
       	// Add RSS links to <head> section
       	automatic_feed_links();
   
       	// Load jQuery
       	if ( !is_admin() ) {
       	   wp_deregister_script('jquery');
       	   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"), false);
       	   wp_enqueue_script('jquery');
       	}
   
       	// Clean up the <head>
       	function removeHeadLinks() {
           	remove_action('wp_head', 'rsd_link');
           	remove_action('wp_head', 'wlwmanifest_link');
           }
           add_action('init', 'removeHeadLinks');
           remove_action('wp_head', 'wp_generator');
   
       	// Declare sidebar widget zone
           if (function_exists('register_sidebar')) {
           	register_sidebar(array(
           		'name' => 'Sidebar Widgets',
           		'id'   => 'sidebar-widgets',
           		'description'   => 'These are widgets for the sidebar.',
           		'before_widget' => '<div id="%1$s" class="widget %2$s">',
           		'after_widget'  => '</div>',
           		'before_title'  => '<h2>',
           		'after_title'   => '</h2>'
           	));
           }
   
           if (function_exists('register_sidebar')) {
           	register_sidebar(array(
           		'name' => 'Middle Widgets',
           		'id'   => 'middle-widgets',
           		'description'   => 'These are widgets for the middle.',
           		'before_widget' => '<div id="%1$s" class="widget %2$s">',
           		'after_widget'  => '</div>',
           		'before_title'  => '<h2>',
           		'after_title'   => '</h2>'
           	));
           }
           if (function_exists('register_nav_menus')) {
       	register_nav_menus(
       		array(
       			'main_nav' => 'Main Navigation Menu'
       			)
       	);
       	}
   
       	// Extend length of post
       		add_filter('excerpt_length', 'my_excerpt_length');
       		function my_excerpt_length($length) {
       		return 100; }
   
       function get_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '')
       {
       	$content = get_the_content($more_link_text, $stripteaser, $more_file);
       	$content = apply_filters('the_content', $content);
       	$content = str_replace(']]>', ']]>', $content);
       	return $content;
       }
       ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-t_if/#post-4554130)
 * How did you fix this?

Viewing 1 replies (of 1 total)

The topic ‘Please help! Parse error: syntax error, unexpected T_IF’ 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/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Matthew](https://wordpress.org/support/users/kidsguide/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/please-help-parse-error-syntax-error-unexpected-t_if/#post-4554130)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
