Title: Parse error: syntax error, unexpected T_CLASS (Spacious Theme)
Last modified: August 30, 2016

---

# Parse error: syntax error, unexpected T_CLASS (Spacious Theme)

 *  [dsw1225hou](https://wordpress.org/support/users/dsw1225hou/)
 * (@dsw1225hou)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class-spacious-theme/)
 * Using WordPress Spacious Theme:
 * **First of all, I copied the entire contents of the original Theme Functions (
   inc/funtions.php) to my notepad and saved it as a backup.
 * I then tried to edit the copyright section to customize it for my needs. After
   I clicked “Update file” I got the following error:
 * _Parse error: syntax error, unexpected T\_CLASS in /home/tmbtxusv/public\_html/
   wp-content/themes/spacious/inc/functions.php on line 466_
 * I looked at line 466 and could not anything wrong with it when I compared it 
   to the original text. Here is line 466:
 * `$tg_link = '<a href="'.esc_url( 'http://themegrill.com/themes/spacious' ).'"
   target="_blank" title="'.esc_attr__( 'ThemeGrill', 'spacious' ).'" rel="designer"
   ><span>'.__( 'ThemeGrill', 'spacious') .'</span></a>';`
 * So in order to get back to a good working state, I highlighted all of the text
   in the Theme Functions (inc/functions.php) area and deleted it. Then I used the
   backup I made and copied that text back into the Theme Functions (inc/functions.
   php) area and the same error still exists!? How can that be?
 * Here is the original text inside the Theme Functions (inc/functions.php) area
   with the section surrounding line 466:
 *     ```
       add_action( 'spacious_footer_copyright', 'spacious_footer_copyright', 10 );
       /**
        * function to show the footer info, copyright information
        */
       if ( ! function_exists( 'spacious_footer_copyright' ) ) :
       function spacious_footer_copyright() {
           $site_link = '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" ><span>' . get_bloginfo( 'name', 'display' ) . '</span></a>';
   
           $wp_link = '<a href="'.esc_url( 'http://wordpress.org' ).'" target="_blank" title="' . esc_attr__( 'WordPress', 'spacious' ) . '"><span>' . __( 'WordPress', 'spacious' ) . '</span></a>';
   
           $tg_link =  '<a href="'.esc_url( 'http://themegrill.com/themes/spacious' ).'" target="_blank" title="'.esc_attr__( 'ThemeGrill', 'spacious' ).'" rel="designer"><span>'.__( 'ThemeGrill', 'spacious') .'</span></a>';
   
           $default_footer_value = sprintf( __( 'Copyright &copy; %1$s %2$s.', 'spacious' ), date( 'Y' ), $site_link ).' '.sprintf( __( 'Powered by %s.', 'spacious' ), $wp_link ).' '.sprintf( __( 'Theme: %1$s by %2$s.', 'spacious' ), 'Spacious', $tg_link );
   
           $spacious_footer_copyright = '<div class="copyright">'.$default_footer_value.'</div>';
           echo $spacious_footer_copyright;
       }
       endif;
       ```
   
 * Does anyone know what the problem is? It shouldn’t be this difficult.

Viewing 1 replies (of 1 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class-spacious-theme/#post-6748426)
 * > I then tried to edit the copyright section to customize it for my needs. After
   > I clicked “Update file” I got the following error:
 * – I take your theme was working before changes you made.
 * you may try:
 * – uploading an unedited copy of the file(s) in question from a fresh download
   of your theme.
 * – If that does not help, upload the entire theme from a fresh download.
 * – if you need immediate access to your dashboard, try switching to the unedited
   default Twenty Fifteen theme. If you don’t have access to your admin area, use
   [FTP ](http://codex.wordpress.org/FTP_Clients), or your web-host’s cPanel or 
   whatever file management application your host provides. Navigate to /wp-content/
   themes/ and switch to the default theme by renaming your current theme’s folder
   by adding “-old” to the end of the folder name. Alternately, you can remove other
   themes except the default theme. That will force your site to use it.

Viewing 1 replies (of 1 total)

The topic ‘Parse error: syntax error, unexpected T_CLASS (Spacious Theme)’ is closed
to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class-spacious-theme/#post-6748426)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
