Title: Parse Error
Last modified: April 5, 2017

---

# Parse Error

 *  [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/)
 * Morning,
 * Yesterday I was finishing my own website when I wrote a wrong string code that
   locked me out of WordPress, now I can’t access at any single part of my website.
   Today I use Filezilla to substitute the wrong string using the original one provided
   by a backup that I made few days ago. But my website is still not working. I’m
   already locked out and when I try to direct on the homepage this written appear
   on the monitor “Parse error: syntax error, unexpected ‘2016’ (T_LNUMBER), expecting
   identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /web/htdocs/www.
   patriarcadesign.it/home/wp-content/themes/mint/functions.php on line 40” that
   is the same written that appears when I wrote the wrong code. But if I see on
   Filezilla the string Functions.php is correct!! I don’t know what I have to do,
   please help me! Thanks for attention!
    -  This topic was modified 9 years, 1 month ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
      Reason: corrected title

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/prase-error/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/prase-error/page/2/?output_format=md)

 *  [MagniGeeks](https://wordpress.org/support/users/magnigeeks/)
 * (@magnigeeks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994614)
 * Hello stepat93,
 * Try clearing your cache. If you have varnish or any other caching plugin that
   was installed on your site. Also can you provide the code that was on functions.
   php?
 * Regards
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994629)
 * That was the code I’ve put in the original one, the mistake is that I write 2016
   instead firsdate in the if cicle after dates [0] (I’m not good using code and
   it is not the first time I made a mistake but never happens something like this).
   How can I clear the cache without acceding to my administrator panel? Using Filezilla?
 * function data_copyright() {
    global $wpdb; $copyright_dates = $wpdb->get_results(”
   SELECT YEAR(min(post_date_gmt)) AS firstdate, YEAR(max(post_date_gmt)) AS lastdate
   FROM $wpdb->posts WHERE post_status = ‘publish’ “); $output = ”; if($copyright_dates){
   $copyright = “© ” . $copyright_dates[0]->firstdate; if($copyright_dates[0]->firstdate!
   = $copyright_dates[0]->lastdate) { $copyright .= ‘-‘ . $copyright_dates[0]->lastdate;}
   $output = $copyright; } return $output; }
 *  [MagniGeeks](https://wordpress.org/support/users/magnigeeks/)
 * (@magnigeeks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994688)
 * Hello stepat93,
 * Thanks for providing the details.The code seems to be fine although I am a bit
   curious to know what’s the purpose of this function. Anyways, try to rename your
   plugins directory using filezilla and try to access your site. Also if you could
   let me know the plugin you are using for caching on the site then I may provide
   you exact information on how to clear cache for that plugin.
 * First, try to rename the plugins directory and try accessing your site also try
   to access other URLs on your site and see if that works.
 * Regards
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994727)
 * The plugins directory is the folder in the main menù where there are all the 
   plugins that I installed? Sorry but I’m italian and my english is very poor and
   talking about this thins in foreign language it is difficult for me 🙂
 *  [MagniGeeks](https://wordpress.org/support/users/magnigeeks/)
 * (@magnigeeks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994770)
 * I understand but you seem to be writing really good English :). Just go to filezilla
   and navigate to wp-content directory. There you can see plugins folder just rename
   it. Also can you share your website url ?
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994878)
 * OK, I rename the plugins directory (I call it pluginsrename), now whah the next
   step is?My website url is [http://www.patriarcadesign.it](http://www.patriarcadesign.it)
 *  [MagniGeeks](https://wordpress.org/support/users/magnigeeks/)
 * (@magnigeeks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994936)
 * Can you try to change your function with this?
 *     ```
       function data_copyright() {
       global $wpdb;
       $copyright_dates = $wpdb->get_results("
       SELECT
       YEAR(min(post_date_gmt)) AS firstdate,
       YEAR(max(post_date_gmt)) AS lastdate
       FROM
       $wpdb->posts
       WHERE
       post_status = 'publish'
       ");
       $output = '';
       if($copyright_dates) {
       $copyright = "&copy;" . $copyright_dates[0]->firstdate;
       if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
       $copyright .= '-' . $copyright_dates[0]->lastdate;
       }
       $output = $copyright;
       }
       return $output;
       }
       ```
   
 * And revert back the plugin folder name to what it was.
    -  This reply was modified 9 years, 1 month ago by [MagniGeeks](https://wordpress.org/support/users/magnigeeks/).
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994958)
 * Where have I write this code? In the Functions.php?
 * <?php
    $theme_dir = get_template_directory();
 * require_once $theme_dir . ‘/classes/Theme.php’;
    require_once $theme_dir . ‘/
   classes/CSS.php’; require_once $theme_dir . ‘/classes/Setup.php’; require_once
   $theme_dir . ‘/classes/Options.php’; require_once $theme_dir . ‘/classes/Helpers.
   php’; require_once $theme_dir . ‘/classes/Modules.php’; require_once $theme_dir.‘/
   classes/PostFormats.php’; require_once $theme_dir . ‘/classes/Shop.php’; require_once
   $theme_dir . ‘/classes/Addons.php’;
 * require_once $theme_dir . ‘/plugins/tgm-plugin-activation/init.php’;
 * if (!MintOptions::get(‘general–wp_version’)) {
    remove_action( ‘wp_head’, ‘wp_generator’);}
   if (!MintOptions::get(‘general–wlwmanifest’)) { remove_action( ‘wp_head’, ‘wlwmanifest_link’);}
   if (!MintOptions::get(‘general–rsd’)) { remove_action( ‘wp_head’, ‘rsd_link’ );}
 *  [MagniGeeks](https://wordpress.org/support/users/magnigeeks/)
 * (@magnigeeks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994963)
 * Just replace the code you sent above with this.
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8994990)
 * I replace the code but it still responds with the same error. The thing that 
   I don’t understand is why the error reports “.. on line 40” when the code has
   only 21 lines!
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8995006)
 * I’ve read about the possibility to remove completely the theme Mint so WordPress
   could switch in automatic on a default theme. So after I could upload the theme,
   that will be downloaded again from themeforest (where I buy it), that probably
   must be correct. I don’t care about the theme, what is important for me are the
   contents because I spent more than a month to do them.
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8995013)
 * It is possible that it doesn’t work because I don’t installed WordPress correctly
   in Filezilla?
 *  [MagniGeeks](https://wordpress.org/support/users/magnigeeks/)
 * (@magnigeeks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8995017)
 * Oh okay, then you should just rename the theme directory you are using and the
   issue would be gone.
 * Regards
 *  [MagniGeeks](https://wordpress.org/support/users/magnigeeks/)
 * (@magnigeeks)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8995025)
 * It doesn’t seem to be issue with WordPress it’s the issue with your theme. Just
   rename mint to mint-old or something else and it would work.
 *  Thread Starter [stepat93](https://wordpress.org/support/users/stepat93/)
 * (@stepat93)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/#post-8995030)
 * Just rename? or could I delete it? so after I could upload it correctly from 
   the administration panel. In case, I have to rename the theme directory that 
   consists in the name of the theme?

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/prase-error/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/prase-error/page/2/?output_format=md)

The topic ‘Parse Error’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 27 replies
 * 3 participants
 * Last reply from: [stepat93](https://wordpress.org/support/users/stepat93/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/prase-error/page/2/#post-8996516)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
