<h2>Лучшие посты</h2>
<div class="top-post">
<?php
// The Query
$args = array(
//'p' => 149' //for single post
//'posts_per_page' => 1, //for single post
'post__in' => array( 8485,159 ), //for multiple posts
'posts_per_page' => 999, //for multiple posts
'ignore_sticky_posts' => 1
);
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) : $the_query->the_post();
?>
<div class="left">
<div class="post">
<div class="cat" ><?php
$category = get_the_category();
if ( $category[0] ) {
echo '<a href="' . get_category_link( $category[0]->term_id ) . '">' . $category[0]->cat_name . '</a>';
}
?></div>
<a href="<?php the_permalink();?>" class="alignleft imgbox" >
<?php the_post_thumbnail(array(400,250, true, array('class' => ''))); ?>
</a>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<div class="date"><?php the_time('d.m.Y') ?></div>
<p class="post-margin"><?php kama_excerpt(); ?></p>
<a class="link" href="<?php the_permalink() ?>">Читать далее</a>
</div><!-- .post -->
</div>
<?php
endwhile;
wp_reset_postdata();
else:
endif;
?>
</div>