Unique Problem with the php date and get_posts
date returns a string but you are using integers in the switch statement. Use: case ’01’: $dateY = date(‘Y’)+1; break; etc. However, the switch code can be much simpler, and there is no need to call the date function again since dateY has already been initialised in advance: switch($dateM) { case ’01’: case ’02’: case … Read more