I'm using fetch_feed() to fetch the google calendar feeds in wordpress. Here's my code:
<?php include_once(ABSPATH . WPINC . '/feed.php');
$feed = fetch_feed('http://www.google.com/calendar/feeds/[email protected]/public/full');
$limit = $feed->get_item_quantity(20);
$items = $feed->get_items(0, $limit);
if (!$items) {
echo "problem";
} else {
// everything's cool
foreach ($items as $item) { ?>
<a class="event-link" href="<?php echo $item->get_permalink(); ?>">
<div class="sidebar-post resource-box">
<p class="date"><span>Date:</span> <?php echo $item->get_date('F j, Y'); ?></p>
<h5><span>Title: </span><?php echo $item->get_title(); ?></h5>
<p><span>Description:</span> <?php echo $item->get_content(); ?></p>
</div>
</a>
<br>
<?php }
} ?>
<?php } ?>
But the problem is it is not showing up the latest feeds. This is the feed url of this calendar. https://www.google.com/calendar/embed?title=NAMI%20St.%20Tammany%20Events&mode=AGENDA&height=600&wkst=1&bgcolor=%23FFFFFF&src=namisttammany%40gmail.com&color=%232952A3&ctz=America%2FChicago