The date wont show in my loop
-
Hi,
I got a problem… I’m doing a loop for my news and the date doesn’t want to show up on the first element… The date still here on the other ones..
<?php // Get lastests news global $post; $myposts = get_posts('numberposts=2&orderby=post_date&order=desc&category=1'); foreach($myposts as $post) { setup_postdata($post); ?> <h3><img src="https://www.detailformation.com/images/fleche-date.gif" align="absmiddle" /> <?php the_date('j F Y'); ?></h3> <strong><?= the_title(); ?></strong> <p><?= the_excerpt(); ?></p> <p align="right" style="text-align: right"> <a href="<?= the_permalink(); ?>" title="<?= the_title(); ?>" class="plus">En savoir plus</a> <img src="https://www.detailformation.com/images/gris-fleche.gif" alt="" align="absmiddle" /> </p> <?php } ?>
Can some one tell me why I got this problem?
Thx,
Patrice
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘The date wont show in my loop’ is closed to new replies.