I tried again several times differently but still the same issue…
I eventually looked for another way to address the problem and found a reordering after doing get_posts($posts). Here it is :
function cmp_birthday($a, $b)
{
$month1 = date('m', strtotime($a->post_date));
$month2 = date('m', strtotime($b->post_date));
$cmp = strcasecmp($month1, $month2);
if ($cmp == 0)
{
$day1 = date('d', strtotime($a->post_date));
$day2 = date('d', strtotime($b->post_date));
return strcasecmp($day1, $day2);
}
else
return $cmp;
}
usort($posts, "cmp_birthday");
I really want to thank you for the time you spent trying to find a solution for me.
Best regards.