• Resolved bradyjfrey

    (@bradyjfrey)


    I’ve attempted to put individual archive days in ascending order, with little affect.

    I started off with putting this in my archive.php file:

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h2 class="entrydate">Archive for <?php the_time('l, F jS, Y'); ?></h2>
    <?php query_posts("day=$current_day&order=ASC");??>

    This does not put an individual day’s post in ascending order — it puts all of the previous posts, but ascending by date, not time for that day.

    I attempted simply:

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h2 class="entrydate">Archive for <?php the_time('l, F jS, Y'); ?></h2>
    <?php query_posts("order=ASC");??>

    Same result as above.

    Example of how it should look for a single day:
    Single day home page for the 27th, will change if you look at this the 28th
    Single day archive page

    That archive page uses the standard:

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    <h2 class="entrydate">Archive for <?php the_time('l, F jS, Y'); ?></h2>

    You can see that on the home page the posts are in the order I prefer. To do this I use:

    <?php $current_month = date('m');??>
    <?php $current_year = date('Y');??>
    <?php $current_day = date('d');??>

    <?php query_posts("year=$current_year&monthnum=$current_month&day=$current_day&order=ASC");??>

    Above my index loop. If I were to do that on a archive page it would simply show the posts for a single day.

    Any ideas? Thank you:)

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘putting individual day archives in ascending order’ is closed to new replies.