• Resolved sluggo

    (@sluggo)


    My blog’s main headers are by date. I’m just using a basic loop:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <h1><?php the_time('F j, Y') ?></h1>
    <h2><?php the_title(); ?></h2>
    <?php the_content(); ?>
    <?php endwhile; ?>
    <?php endif; ?>

    This works fine for me except that if there’s more than one post on the same day, that <h1> repeats. How can I get it to only show the date <h1> once for a day (before the first post?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Header by date?’ is closed to new replies.