Hi all,
I've crated a customized breadcrumb in the archives template. What I want is display in the breadcrumb a title like "Archive for March". Everything works perfect, except the the_time formatting. Despite of what format I apply, I always get the same formatting, i.e. "Month dd, yyyy". In the example below, I've also pasted another test that I made with get_the_time which it just doesn't work.
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2>Archive for <?php the_time('F, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2>Archive for <?php get_the_time('F, Y', $post->ID); ?></h2>
<?php } ?>
What should I do? Any help is welcomed.
Many thanks