Support » Fixing WordPress » Grouping entries with the same date

  • Hello!

    I am currently designing my archive-template and I want to group all the entries which were posted at the same date! I want to have the date of the latest posted entry from that day on top of it and the other entries divided with a horizontal line.

    How can I do this?

    Thank you very much!

    Sincerely,
    lynx

Viewing 6 replies - 1 through 6 (of 6 total)
  • By archive-template did you mean the archive.php file?

    Anyway, have ever looked at the template tags used for displaying date/time?
    http://codex.wordpress.org/Template_Tags#Date_and_Time_tags
    Hint: the_date

    yes, I meant the “archive.php”.

    I use the following command:

    “<?php the_time(‘l,’) ?> <?php the_time(‘j. F Y’) ?>”

    That is okay, but I don’t know how to display e.g. three entries under the same date.

    greetings,
    lynx

    Read again my post’s last line and READ the documentation. Don’t post back until you really read about the_date.

    okay.

    The Problem is:

    I wrapped “the_date” inside a table like:

    <table width=”700″ align=”center”>
    <tr bgcolor=”#FFFFFF”>
    <td>.<small><?php the_date(‘l, j. F Y’); ?></small>.</td>
    </tr>
    </table>

    Now, for every entry that is posted at the same day, there is an empty table! BUT
    my idea is: “Publish the date for the last entry that was posted that day and insert a horizontal rule between the other entries that were posted that day.”

    Instead, wordpress inserts this table and that is annoying.

    Another hint? Maybe? 🙂

    Thanx anyway!

    Hint? Don’t use tables 🙂

    Well, does nobody know how I could solve this problem?

    Again:

    I’m using “<?php the_date(‘l, j. F Y’); ?>” in my archive.php. This means that WordPress only displays “<?php the_date(‘l, j. F Y’); ?>” once if there were more than one entry at that day. I really don’t like the style of “<?php the_date(‘l, j. F “Y’); ?>”, so I want to insert the following:

    “<table width=”700″ align=”center”>
    <tr bgcolor=”#FFFFFF”>
    <td><img src=”http://www.doamin.com/images/sample.jpg” width=”20″ height=”20″ alt=”sample” title=”sample”/>
    <font color=”#000000″ size=”2″ face=”Arial, Helvetica, sans-serif”><B>.<small>”

    before

    “<?php the_date(‘l, j. F Y’); ?>”

    and

    “</small>.</B></font></td>
    </tr>
    </table>”

    after “<?php the_date(‘l, j. F Y’); ?>”.

    Unfortunately now there is an empty table everywhere the date was ignored because of the “one-date-per-multiple-entries”-rule.

    How can I solve this?

    Yours sincerely,
    lynx

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Grouping entries with the same date’ is closed to new replies.