WordPress Bleg

In Moveable Type, on the front page, there was a separator between one day’s posts and the next with a day/date (see The Corner for an example). There should be one between the two posts below this one. It seems like it ought to be a standard feature, but I cannot for the life of me figure out how to do this in WP at all, after scouring the documentation. Does anyone have an idea?

5 thoughts on “WordPress Bleg”

  1. If you check out the “classic” WordPress theme (that you still might have in your Themes list — it’s the ugly gray-green one) it has the date header before the title. I think that might be what you need. You can just snag the tag from that theme:

    <?php the_date(”,”,”); ?>

    You can change the h2 to any size you like, and the underlining and other styles of the date header can be changed in the stylesheet.

  2. Whoops — okay, the “pre” tag didn’t exactly show everything. The “h2” tags I referred to are inside the quotation marks. Anyway, the full tag is in the main index template of the classic theme under the “php if have (posts())” tag. Let me know if that helps.

  3. < ?php the_date(”,”,”); ?>

    I know about the date tag, Andrea (it’s in my template to mark the date on each post). What I don’t understand is how to have it display only at a date boundary.

  4. Hmm. I thought that’s what it did — then again, I’m looking at a classic template in a test install of WordPress, and there are only two test posts with different dates. Maybe moving the tag outside “if post”? Or else enclose everything in a “div” tag somehow. I never really did learn to do too much with WordPress tags — I would just hunt around for themes other people had made. I’ll hunt around the WordPress docs — maybe they have a way of doing it.

  5. If you were running ExpressionEngine I’d know exactly what to do. The one time I tried tweaking WordPress themes I had to give up because my ears were bleeding.

    And to think I had started out by tweaking Blogger and MT templates to my exact specifications, and now I doubt I could do that with their themes either.

Comments are closed.