Support » Fixing WordPress » Changing Date Format

  • 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; ?>
Viewing 1 replies (of 1 total)
  • esmi

    (@esmi)

    Forum Moderator

    <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>

Viewing 1 replies (of 1 total)
  • The topic ‘Changing Date Format’ is closed to new replies.