WordPress.org

Forums

Changing Date Format (2 posts)

  1. wyclef
    Member
    Posted 6 years ago #

    How can I change the date formatting so it only displays the first 3 characters of the month and then just the numbers and no 'nd' or 'th'?

    <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    					<h5><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
    					<h6 class="date-box"><span class="date"><span class="date-month"><?php the_time('F') ?></span><span class="date-num"><?php the_time('jS') ?></span></span></h6>
    					<?php the_content(); ?>
    				<?php endwhile; ?>
    				<?php endif; ?>
  2. esmi
    Forum Moderator
    Posted 6 years ago #

    <h6 class="date-box"><span class="date"><span class="date-month"><?php the_time('M') ?></span><span class="date-num"><?php the_time('j') ?></span></span></h6>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.