• Hello,

    I would like to know if there’s anyway I can determine if the entry is of the same day? For example, if 2 entries are published on the same day, I would want to add some code for a different css class.

    Thanks!

Viewing 1 replies (of 1 total)
  • <?php
    $post1 = get_posts('p=421');
    $post2 = get_posts('p=419');
    $post1_date = mysql2date("Ymd", $post1[0]->post_date);
    $post2_date = mysql2date("Ymd", $post2[0]->post_date);
    if ($post1_date = $post2_date) {
    echo 'dates for post id 421 and 419 are the same';
    }
    ?>
Viewing 1 replies (of 1 total)

The topic ‘Same day entry’ is closed to new replies.