Displaying the Date and Time in the WordPress Loop

<ul class="newsletters">
    <?php $query = new WP_Query( array(
        'post_type' => 'post',
        'category_name' => 'newsletters',
        'posts_per_page' => 8
    ) );
    while ($query->have_posts()) : $query->the_post(); ?>
    <li class="home newsletter"><a href="<?php the_permalink(); ?>"><?php the_title(); ?> - <?php echo get_the_date( 'j F, Y' ); ?></a></li>
    <?php endwhile; ?>
</ul>

Leave a Comment

Your email address will not be published.

AllEscortAllEscort