Code: Select all
<?php get_header(); ?>
<div id="content">
<?php
$i=0;
$j=0;
while ($i<=4):
$currentd = date("d", (mktime(0, 0, 0, date("m") , date("d")-$j, date("Y"))));
$currentM = date("M", (mktime(0, 0, 0, date("m") , date("d")-$j, date("Y"))));
$currentY = date("Y", (mktime(0, 0, 0, date("m") , date("d")-$j, date("Y"))));
query_posts("year=$currentY&monthnum=$currentM&day=$currentd&order=DESC");
if (have_posts()) : ?>
<div class="date"><span><strong><?php the_time('F j, Y'); ?></strong></span></div>
<?php query_posts("year=$current_year&monthnum=$current_month&day=current_day&order=ASC&tag=interview");
if ( have_posts() ) :
while ( have_posts() ) : the_post();
update_post_caches($posts); ?>
<!-- formatting goes here -->
<?php endwhile;
query_posts("year=$current_year&monthnum=$current_month&day=current_day&order=ASC&tag=articles");
if ( have_posts() ) :
while ( have_posts() ) : the_post();
update_post_caches($posts); ?>
<!-- formatting goes here -->
<?php endwhile;
$i++;
$j++;
else:
$j++;
endif;
wp_reset_query();
else:
$j++
endif;
endwhile; ?>
<!-- Prev/Next page navigation -->
<div class="page-nav">
<div class="nav-previous"><?php previous_posts_link('Previous Page') ?></div>
<div class="nav-next"><?php next_posts_link('Next Page') ?></div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Code: Select all
$currentd = date('d',strtotime("-$j day"));
$currentM = date('M',strtotime("-$j day"));
$currentY = date('Y',strtotime("-$j day"));