Adding the Post Time to my Template (1 post)

  1. SpadgeFox
    Posted 6 years ago #

    Hi there. I'd like to add the time a post was first published in the top of the post. It currently shows the day month and year and has the following code:

         $time = get_the_time('M d Y');
         list($mo, $da, $ye) = explode(" ", $time);
      <div class="date" title="<?php the_time('d-m-Y'); ?>">
             <span class="month"><?php echo($mo); ?></span>
             <span class="day"><?php echo($da); ?></span>
             <span class="year"><?php echo($ye); ?></span>

    How would I modify this to add a line for time above the date. Thanks very much.


Topic Closed

This topic has been closed to new replies.

About this Topic