'.$instance['custom_css'].''; } if($instance['itemstoshow']!=0){ $numberofitems = $instance['itemstoshow']; } else{ $numberofitems = count($awp_all_news); } if(!empty($awp_all_news)){ if ($instance['title']) echo $before_title . apply_filters('widget_title', $instance['title']) . $after_title; foreach($awp_all_news as $news){ if($count <= $numberofitems){ if( $news->publishedAt == '' ) { $creationDate = explode('T',$news->creationDate); $ListDate=strtotime($creationDate[0]); $post_date=date('M d, y',$ListDate); }else { $post_date = $news->publishedAt; } echo '
'; } $count++; } echo $css; } echo $after_widget; ?>