Skip to content

Instantly share code, notes, and snippets.

@jclapp23
Last active December 20, 2015 05:39
Show Gist options
  • Save jclapp23/6079709 to your computer and use it in GitHub Desktop.
Save jclapp23/6079709 to your computer and use it in GitHub Desktop.
WP_Cal_Demo #4
<?php
if ( $dayswithposts ) {
foreach ( $dayswithposts as $daywith ) {
$daywithpost[] = $daywith->dom;
$post_title = esc_attr( apply_filters( 'the_title', $daywith->post_title, $daywith->post_id ) );
if(empty($ak_titles_for_day)){
$ak_titles_for_day[$daywith->dom]= array ();
$ak_titles_for_day["$daywith->dom"][] = array('title'=>$daywith->post_title,'url'=>$daywith->guid);
}else{
$ak_titles_for_day["$daywith->dom"][] = array('title'=>$daywith->post_title,'url'=>$daywith->guid);
}
}
} else {
$daywithpost = array();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment