<div class="am-list-news-bd">
<ul class="am-list">
<?php
$i=1;
query_posts(array(
"category__in" => 3,
"post__in" => get_option("sticky_posts")
)
);
while(have_posts()) : the_post();
if($i <=5) {
$i++;
?>
<li class="am-list-item-dated">
<a href="<?php the_permalink() ?>" class="am-list-item-hd " >【置顶】<?php ODD_title(31); ?></a>
<span class="am-list-date"><?php echo get_the_time('Y-m-d');?> </span>
</li>
<?php
}
endwhile;
wp_reset_query();
?>
<?php
$posts = get_posts( "category=3" );
?>
<?php if( $posts ) : ?>
<?php while(have_posts()) : the_post(); ?>
<?php if(!is_sticky()){
if($i <=5) {
$i++;
?>
<li class="am-list-item-dated">
<a href="<?php the_permalink() ?>" class="am-list-item-hd " ><?php ODD_title(31); ?></a>
<span class="am-list-date"><?php echo get_the_time('Y-m-d');?> </span>
</li>
<?php }} endwhile;?>
<?php
endif;
?>
<div class="am-list-news-hd am-cf">
<a href="<?php echo get_category_link(3);?>" > <span class="am-list-news-more am-fr">更多 »</span></a>
</div>
</ul>
</div>