WordPress.org

Ready to get started?Download WordPress

Forums

Line breaks within the_date? Or something else? (2 posts)

  1. Ryan Markel
    Member
    Posted 5 years ago #

    It's possible that it's late and I just can't figure this 'cause my brain's foggy.

    I'd like to call the date of a series of posts only once per day, and I would also like to use a line break between each item in the date call.

    e.g.

    tue
    07
    mar

    I can of course do this by using multiple calls to the_time, but then I get it with every post, and not just once per day as I'd like. Can anyone point me in the right direction?

  2. Ryan Markel
    Member
    Posted 5 years ago #

    Backslashes as escape characters.

    For anyone else looking for this solution, I ended up doing this:

    <div id="postdate" class="<?php the_time('M','','') ?>"><?php the_date('D\<\b\r\/\>d\<\b\r\/\>M','',''); ?></div>

Topic Closed

This topic has been closed to new replies.

About this Topic