阅读背景:

返回自定义帖子类型中已发布帖子的数量

来源:互联网 
<?php
    $counter=1;
    $counter_new=0;
    $args = array('posts_per_page' =>-1,'orderby' => 'post_date','order' =>'DESC','post_type' => 'interview','post_status' => 'publish',            
    'suppress_filters' => true );query_posts( $args );while (have_posts($args)) : the_post();
    if($counter < 8)
    {
        $counter++;
    }
    else
    {
        $counter_new++;
        $counter=1;
    }
endwhile;
?>  
<?php
    $counter=1;
    $counter_new=0;
    $



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: