Title: Parse error: syntax error, unexpected &#039;else&#039; (T_ELSE) in
Last modified: August 21, 2016

---

# Parse error: syntax error, unexpected 'else' (T_ELSE) in

 *  [otraf](https://wordpress.org/support/users/otraf/)
 * (@otraf)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-else-t_else-in/)
 * Hi, I wanted to customize the header of my blog and I did something wrong. Know
   I can´t even open the web and this message is shown:
    “Parse error: syntax error,
   unexpected ‘else’ (T_ELSE) in /homepages/4/d471838597/htdocs/wp-content/themes/
   mixfolio/inc/custom-header.php on line 50”
 * What I did wrong is introduce in the original custom-header.php with this (replacing
   the original):
 * _[ Moderator Note: [Please post code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
   or markup snippets between backticks or use the code button. ]_
 *     ```
       $defaults = array(
           'default-image'          => '',
           'random-default'         => false, manualmente
           'width'                  => 0,
           'height'                 => 0,
           'flex-width'             => false,
           'flex-height'            => false,
           'default-text-color'     => '',
           'header-text'            => true,
           'uploads'                => true,
           'wp-head-callback'       => '',
           'admin-head-callback'    => '',
           'admin-preview-callback' => '',
       );
       add_theme_support( 'custom-header' , $defaults );
       ```
   
 * Thanks!
 * [http://www.otraformade.com](http://www.otraformade.com)

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

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-else-t_else-in/#post-3821664)
 * Step number one is get a fresh copy of that commercial theme from the vendor 
   and undo what you’ve done on that file.
 * [http://graphpaperpress.com/themes/mixfolio/](http://graphpaperpress.com/themes/mixfolio/)
 * We don’t support [commercial themes here](http://codex.wordpress.org/Forum_Welcome#Commercial_Products).
 * Once you’ve undone the damage then consider [creating a child theme](http://codex.wordpress.org/Child_Themes)
   and contact that vendor for what’s the safest way to add that code. Normally 
   you would place it in the child theme’s `functions.php` file but they may have
   a different way to do that.
 * [http://graphpaperpress.com/support/](http://graphpaperpress.com/support/)
 *  Thread Starter [otraf](https://wordpress.org/support/users/otraf/)
 * (@otraf)
 * [13 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-else-t_else-in/#post-3821670)
 * ok, thanks a lot!
 *  [Aleksandar Mijailovic](https://wordpress.org/support/users/aleksandar-mijailovic/)
 * (@aleksandar-mijailovic)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-else-t_else-in/#post-3821886)
 * Hi, I also wanted to customize the header and I think I deleted something.
    Now
   I have: Parse error: syntax error, unexpected T_ELSE in /home/a5619744/public_html/
   wp-content/themes/twentytwelve/inc/custom-header.php on line 156
 * I don´t know nothing about coding. How can I recover my site? I need solution
   step by step ´cause I am really dumb for this game.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-else-t_else-in/#post-3821887)
 * [@aleksandar](https://wordpress.org/support/users/aleksandar/) Mijailovic – you’ll
   need to access your site files on the server using FTP or Cpanel (ask your hosting
   if you don’t know how to do that) – and delete that theme. Then reinstall it 
   when you’ve logged in again.

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

The topic ‘Parse error: syntax error, unexpected 'else' (T_ELSE) in’ is closed to
new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-else-t_else-in/#post-3821887)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
