Title: Parse error: syntax error, unexpected T_FUNCTION
Last modified: August 30, 2016

---

# Parse error: syntax error, unexpected T_FUNCTION

 *  [JCCaito7](https://wordpress.org/support/users/jccaito7/)
 * (@jccaito7)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-19/)
 * Hi everyone,
 * I was trying to remove the Posted by section on my blog, and had been researching
   Child Themes, but couldn’t quite figure it out. I think I made a stupid decision
   and tried to remove a piece of coding from Template-Tags.php. Now I’m getting
   this every time I try to open a page: Parse error: syntax error, unexpected T_FUNCTION
   on line 72
 * Here’s the area I changed:
 * * Prints HTML with meta information for the current post-date/time and author.
   */
   function ys_magazine_posted_on() { <—-this should be line 72 $time_string = ‘
   <time class=”entry-date published updated” datetime=”%1$s”>%2$s</time>’; if (
   get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) { $time_string = ‘<time
   class=”entry-date published” datetime=”%1$s”>%2$s</time><time class=”updated”
   datetime=”%3$s”>%4$s</time>’;
 * Please help.
 * Thanks.

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

 *  [Bill](https://wordpress.org/support/users/chubbycrow/)
 * (@chubbycrow)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-19/#post-6316540)
 * Easiest fix is to replace the edited one on your hosting account server with 
   a fresh, unedited one. You can use an [FTP client](http://codex.wordpress.org/FTP_Clients)(
   like FileZilla), or your web-host’s cPanel or file manager to do this. File manager
   is easiest if you aren’t familiar with ftp.
 * Find a copy of it in a freshly-downloaded copy of the theme. Copy the bad one
   from the server to your computer for reference, delete it from the server, and
   upload the new one.
 * Whenever you want to make any changes to your theme, you should make them to 
   a [child theme](http://codex.wordpress.org/Child_Themes) instead. That way you
   won’t lose your changes when the parent theme gets updated. A child theme is 
   not difficult to make and can save you a lot of trouble in the future.
 *  Thread Starter [JCCaito7](https://wordpress.org/support/users/jccaito7/)
 * (@jccaito7)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-19/#post-6316557)
 * What if I don’t have access to hosting account server? The site is being hosted
   by someone that I do not have access to at this time.
 * Any other options?
 *  [Bill](https://wordpress.org/support/users/chubbycrow/)
 * (@chubbycrow)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-19/#post-6316559)
 * If you can access the theme administration page (`Appearance > Themes`), you 
   could switch themes to maybe a default WP theme, delete the problem theme, and
   then re-install and re-activate it (but _only_ if it is available in the WP repository).
   Any user-created changes that may have been made to the theme will be lost, of
   course.
 *  Thread Starter [JCCaito7](https://wordpress.org/support/users/jccaito7/)
 * (@jccaito7)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-19/#post-6316562)
 * Now I can’t even access the WordPress Login page without getting the error.
 * All I did was add something after the bracket on line 72, updated, it did not
   work, so I deleted it and updated again. Something that simple could cause this?
 *  [Bill](https://wordpress.org/support/users/chubbycrow/)
 * (@chubbycrow)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-19/#post-6316563)
 * > Something that simple could cause this?
 * Absolutely.
 * It follows that without access to the file (or theme), not much can be done. 
   You either need to contact someone who does have access, or convince the web 
   host to assist you. That will be difficult if the account is not yours. Sorry.

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Bill](https://wordpress.org/support/users/chubbycrow/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-19/#post-6316563)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
