Имеется код:
<div class="b-content" role="main">
<h1><?php
if ( is_day() ) :
printf( __( 'Daily Archives: <span>%s</span>', '' ), get_the_date() );
elseif ( is_month() ) :
printf( __( 'Monthly Archives: <span>%s</span>', '' ), get_the_date( _x( 'F Y', 'monthly archives date format', '' ) ) );
elseif ( is_year() ) :
printf( __( 'Yearly Archives: <span>%s</span>', '' ), get_the_date( _x( 'Y', 'yearly archives date format', '' ) ) );
else :
_e( 'Events Archives', '' );
endif;
?></h1>
<?php if( ! empty($wp_query->posts) ) : ?>
<div class="post-list">
<?php foreach ( $wp_query->posts as $post ) : ?>
<div class="post-list-item cf">
<div class="post-list-date">
<span class="post-list-date-day"><?php echo get_the_time( 'j', $post ); ?></span>
<span class="post-list-date-m"><?php echo get_the_time( 'M', $post ); ?></span>
<span class="post-list-date-year"><?php echo get_the_time( 'Y', $post ); ?></span>
</div>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-list-thumb"><a href="<?php echo get_permalink( $post->ID ); ?>"><?php the_post_thumbnail( 'post-list-thumb' ); ?></a></div>
<?php endif; ?>
<div class="post-list-descr">
<h3 class="post-list-title"><a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $post->post_title; ?></a></h3>
<div class="post-list-excerpt"><?php the_post_excerpt( $post ); ?></div>
</div>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ( function_exists('wp_paginate') ) : wp_paginate(); endif; ?>
</div>
не могу разобраться, как использовать
$args = array(
'post_type' => 'post',
'orderby' => 'date',
'order' => 'DESC',
)
при данном примере