WordPress.org

Ready to get started?Download WordPress

Forums

Help on formatting the post date? (6 posts)

  1. axtran
    Member
    Posted 1 year ago #

    I'm wondering how to format the post date that displays on all of my posts. Not style it per se, but actually rearrange how it looks (and the styling will come later). For instance, my dates are currently displayed as "Month, day, year" but I want to get them to look like

    day
    MONTH
    year

    Basically, I'm trying to get my post dates to look like the "box calendar" style on many blogs. I did find the Codex page on formatting the post date and time, but uh, when I copied one of the examples into my functions.php to try it out it ended up breaking my site. I'm still not too familiar with php and messing around with the functions.php file. Thanks!

    (this is the Codex doc I was talking about: http://codex.wordpress.org/Formatting_Date_and_Time)

  2. WP Dashboard -> Settings -> General

    Can't you adjust your date format there?

  3. axtran
    Member
    Posted 1 year ago #

    Hmm but you can't do things like add line breaks to separate the day and month, for example, or to make one element stand out above the other? (if you could that would be amazing... can you??)
    I have a strong feeling I need to change the_date() via functions.php but I just don't know how that should look. Still digging around the web...

  4. Gotcha.

    What theme are you using? It is pretty much up to the developer of the theme on how they format the date.

    It resides in your themes files.. but it's always best to create a child theme first.. and make your modifications from there.

  5. axtran
    Member
    Posted 1 year ago #

    Ah figures, guess I will need to get to work on learning that php!

    I'm using the Canvas theme by Woothemes. Ideally I'd like my dates to look like the dates on this blog http://chrisblattman.com/ - simple and distinguished. Though I fear implementing it won't be so simple. Thanks for your help!

  6. axtran
    Member
    Posted 1 year ago #

    Hah, I figured out an easier solution without having to resort to the php (whew)

    I wrapped my post_date within a div and then used CSS to define the div such that the text wrapped within it to look like the desired effect. ex http://www.axtran.com/

    It's kind of a hack but it works :)

Topic Closed

This topic has been closed to new replies.

About this Topic