WordPress.org

Support

Support » How-To and Troubleshooting » Possible to use the_date twice in one loop?

Possible to use the_date twice in one loop?

  • I need to assign different CSS classes to different parts of the date but can’t figure out how to sparate parts of the date. For instance, I deally I’d do like

    <?php the_date(‘M’, ‘<h2 class=”date-m”>’,'</h2>’); ?>
    <?php the_date(‘d’, ‘<h2 class=”date-d”>’,'</h2>’); ?>

    But it will only echo the first the_date.

    Any ideas on how to echo it twice?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to use the_date twice in one loop?’ is closed to new replies.
Skip to toolbar