Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
topnegozi
tagDiv Member

I found the problem. It’s in tdb_state_date.php file of cloud library (includes/state/date). Using DateTime function you cannot use the setlocale that bring the one you specify in WordPress. So I have changed it like this:

function set_wp_query( $wp_query ) {

setlocale(LC_TIME, get_locale());

parent::set_wp_query( $wp_query );

$this->date_wp_query = $this->get_wp_query();
$this->current_year = $this->date_wp_query->query_vars['year'];

if ( $this->date_wp_query->is_month ) {

$monthNum = $this->date_wp_query->query_vars['monthnum'];
//$dateObj = DateTime::createFromFormat('!m', $monthNum);
//$this->current_month = $dateObj->format('F');
$this->current_month = strftime("%B", mktime(0, 0, 0, $monthNum , date("d"), date("Y")));
$this->current_month_num = $monthNum;

}

if ( $this->date_wp_query->is_day ) {

$monthNum = $this->date_wp_query->query_vars['monthnum'];
//$dateObj = DateTime::createFromFormat('!m', $monthNum);

$this->current_month_num = $monthNum;
//$this->current_month = $dateObj->format('M');
$this->current_month = strftime("%B", mktime(0, 0, 0, $monthNum , date("d"), date("Y")));
$this->current_day = $this->date_wp_query->query_vars['day'];

}

}

the commented lines are the original ones.

I have also changed the $data_array[‘title’] assignments just to better represent the dates for italian people. For this part maybe you havce to add some options in the layout editor.

topnegozi
tagDiv Member

I have the same issue, and even if i choose not to use cloud templates and edit archive.php file it doesn’t show anything on archive pages.

Viewing 2 posts - 1 through 2 (of 2 total)