php - Sort by Today, Yesterday, and All posts before yesterday - Wordpress -


so here's code:

<div id="content" role="main">      <?php while (have_posts()) : the_post(); ?>      <div <?php post_class() ?> id="post-<?php the_id(); ?>">          <div class="page-content rich-content">              <?php                 // updated                  $args = array(                                           'view' => 'grid-mini',                     'title' => __('recently added', 'dp'),                     'post_type' => 'post',                     'ignore_sticky_posts' => true,                     'posts_per_page' => 999,                     'orderby' => 'date',                 );                 dp_section_box($args);             ?>          </div>      </div><!--end .hentry-->     <?php endwhile; ?> 

i sort query different sections.

each section page, don't need have args put 1 file.

i asking how possible sort them by: today, yesterday, , posts before yesterday!

i have been searching online on 5 hours now, no luck :)


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -