My site has "Tegalog" embedded, so I'm putting it to good use.
In function.php:
function get_tegalog_last_updated() {
$rss_content = @file_get_contents('※Directory');
if (!$rss_content) return date('Y年n月j日'); // ★Returns today's date
$rss_content = mb_convert_encoding($rss_content, 'UTF-8', 'auto');
$rss = simplexml_load_string($rss_content);
$latest_item = $rss->channel->item[0] ?? null;
if ($latest_item && isset($latest_item->pubDate)) {
return date('Y年n月j日', strtotime((string)$latest_item->pubDate));
}
return date('Y年n月j日'); // ★Returns today's date
}
index.php contains
<div class="last-updated">
<p>Last Updated: <?php echo get_tegalog_last_updated(); ?></p>
</div>
Since this was CGI, it was easy to handle,
but for Instagram, a plugin might be easier.
