Title: Parse error: syntax error, unexpected T_STRING
Last modified: August 19, 2016

---

# Parse error: syntax error, unexpected T_STRING

 *  [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * (@mathiasf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/)
 * Hello.
    I was fumbling around in my sidebar.php, and out of the blue it was fucked
   up (a)
 * Anyway, my error looks like this:
    Parse error: syntax error, unexpected T_STRING,
   expecting ‘(‘ in /home/a9872283/public_html/wp-content/themes/absynthe/sidebar.
   php on line 2
 * My sidebar.php looks like this:
    <div id=”sidebar”> <?php if function_exists(‘
   dynamic_sidebar’) || !dynamic_sidebar() ) : ?>
 *  <div class=”main”>
    <div class=”middle”> <div class=”bottom”> <h2>Categories
   </h2>
    -  <? wp_list_cats(); ?>
 *  </div>
    </div> </div>
 *  <? endif; ?>
    </div>

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

 *  Thread Starter [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * (@mathiasf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143126)
 * I tried by myself, but it didn’t work.
    Look at: [http://www.design.netii.net](http://www.design.netii.net)
   for the error.
 * Now the sidebar.php code looks like this:
 * <div id=”sidebar”>
    <?php if (function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(
   1)) : ?> <?php endif; ?>
 *  <div class=”main”>
    <div class=”middle”> <div class=”bottom”> <h2>Categories
   </h2>
    -  <?php wp_list_cats(); ?>
       <?php include(‘adsense_sidebar.php’) ?>
 *  </div>
    </div> </div> </div>
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143164)
 * `<?php if (function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>`
 * Missing opening bracket for the if statement.
 *  Thread Starter [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * (@mathiasf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143167)
 * Thanks, but now it’s a another problem.
    I can just see my categories, and not
   my other sidebars widgets. Why?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143310)
 * Try `<?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Left 
   Column’) ) : ?>
    <?php endif; ?> `
 *  Thread Starter [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * (@mathiasf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143352)
 * Unfortunately it’s now working.
 * <div id=”sidebar”>
    <?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘
   Left Column’) ) : ?> <?php endif; ?>
 *  [Jay Mayu](https://wordpress.org/support/users/mayooresan/)
 * (@mayooresan)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143353)
 * Unfortunately??? 🙂
 *  Thread Starter [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * (@mathiasf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143354)
 * What is the problem? 😛
 *  Thread Starter [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * (@mathiasf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143386)
 * Please help.
 * <div id=”sidebar”>
    <?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘
   Left Column’) ) : ?> <?php endif; ?>
 * <div class=”main”>
    <div class=”middle”> <div class=”bottom”> <h2>Categories</
   h2>
 * <? wp_list_cats(); ?>
    </div> </div> </div>
 * <? endif; ?>
    </div>
 * I still get the error message
 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143387)
 * Why not just download a fresh copy of your theme and replace the bad sidebar.
   php with the unedited one?
 *  Thread Starter [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * (@mathiasf)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143388)
 * Thanks Iridiax 😀

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 4 participants
 * Last reply from: [mathiasf](https://wordpress.org/support/users/mathiasf/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-10/#post-1143388)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
