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
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;
}
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
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 π
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 ?
OK, I rename the plugins directory (I call it pluginsrename), now whah the next step is?My website url is http://www.patriarcadesign.it
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 = "©" . $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 8 years, 2 months ago by
MagniGeeks.
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’ );
}
Just replace the code you sent above with this.
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!
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.
It is possible that it doesn’t work because I don’t installed WordPress correctly in Filezilla?
Oh okay, then you should just rename the theme directory you are using and the issue would be gone.
Regards
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.
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?