WordPress.org

Ready to get started?Download WordPress

Forums

Adding the Post Time to my Template (1 post)

  1. SpadgeFox
    Member
    Posted 5 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:

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

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

    Spadge

Topic Closed

This topic has been closed to new replies.

About this Topic