Plugin Author
alek
(@alekart)
Hello!
Can you please send me a link of your website? Maybe I’ll find the bug?
This is Archives calendar, it shows months or years where there are some posts. It is not supposed to show future months.
If there’s no posts in the actual month (august) it will not be shown, and it will show the nearest past month that has at least 1 post.
Spanish is actualy included in the plugin, but the translation file wasn’t updated since 0.3.1 version, some terms are not translated. Names of month and weekdays are translated by the wordpress default localization files,
make sure that you wp-config.php file contains this line :
define('WPLANG', 'es_ES');
and that you have es_ES.po
and .mo, admin-es_ES.po
and .mo files in the \wp-content\languages
folder
Hello Alek!
Thanks for your prompt reply.
There are already posts in August, September, October and November, so August should be the month shown.
Our website is http://www.alicanteout.es (we are still building the site).
I really appreciate you help to solve this problem, we want to launch the site ASAP 🙂
Thanks again for your support.
Best regards,
Plugin Author
alek
(@alekart)
It was not foreseen to show future articles, btw wordpress does not publish articles in the future by default.
For now you can replace these lines (581-582):
581 $archiveYear = $months[0]->year; // if no current year -> show the more recent
582 $archiveMonth = $months[0]->month; // year to be visible
by these:
if( $months[0]->month > intval( date('m') ) && intval($months[0]->year) >= intval( date('Y') ) )
{
$found = false;
for( $i=0; $i<count($months) && !$found; $i++ )
{
if($months[$i]->month <= intval( date('m') ) && intval($months[$i]->year) <= intval( date('Y') ) )
{
$found = true;
$archiveYear = $months[$i]->year;
$archiveMonth = $months[$i]->month;
}
}
}
else
{
$archiveMonth = $months[0]->month;
$archiveYear = $months[0]->year;
}
It should work.
I will incorporate this into the next update later.
Hi Alek!
I’m new at WP… Could you please tell me the path and the file I should modify?
Thanks a lot!
Plugin Author
alek
(@alekart)
Sorry, forgot to mention the filename to edit 🙂
here it is:
wp-content/plugins/archives-calendar-widget/archives-calendar.php
You made my day! 🙂 It works perfect!!!
Thank you so much for you kind support and you awesome plugin 🙂
5 stars!!
Best regards,
Hi Alek,
Although you already helped me to solve the problem to display the current month with future posts, I wrote some posts which date is January and February 2015, and checked that then the calendar shows again the last month with events, that is, February 2015, instead of September 2014. If I send them to draft it’s ok again, but I need them to be published now.
I would really appreciate it if you could please help me again to fix this.
Thanks a lot for your great support.
Best regards,
Plugin Author
alek
(@alekart)
Hi,
yeah my condition was wrong, this one should work:
if( $months[0]->year > intval( date('Y') ) || ( $months[0]->year == intval( date('Y') ) && $months[0]->month > intval( date('m') ) ) )
{
$found = false;
for( $i=0; $i<count($months) && !$found; $i++ )
{
if( $months[$i]->year <= intval( date('Y') ) && $months[$i]->month <= intval( date('m') ) )
{
$found = true;
$archiveYear = $months[$i]->year;
$archiveMonth = $months[$i]->month;
}
}
}
else
{
$archiveMonth = $months[0]->month;
$archiveYear = $months[0]->year;
}
It’s a temporary fix, i’m working on the new version I’ve changed a lot of things. The new features should suit your needs, I hope I will finish it soon.
Hi Alek,
Thanks a lot for your quick reply, it worked again 🙂
Keep waiting for the new version of your awesome plugin.
Best regards,
Please help me , dear alek, my site is three languages with WPML, dont found any post archive plugin for my site, your plugin is cool but it isnt work, whta can i do please help me
This is my website adress- http://scfwca.gov.az/?page_id=4715#
Plugin Author
alek
(@alekart)
Hello shamo11,
You use a paid plugin (WPML) that I don’t have so I can’t test my plugin with WPML installed.
The problem discussed above is not even related to yours.
To report an issue please use the support section.
Best regards.