wordpress首页侧边栏调用热门文章需要配合WP-PostViews插件,最主要的参数是: 'meta_key' => 'views', 和 'orderby' => 'meta_value_num', 才能使用效果。 <?php $args=array( 'meta_key' => 'views', 'orderby' => 'meta_value_num', 'posts_per_page'=>10, 'order' => 'DESC' ); query_posts($args); while (have_posts()) : the_post();?> <li><img <?php the_post_thumbnail( array(60,60) ); ?><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile;wp_reset_query();?> 你学会了吗? 未经允许不得转载:泥人传说 » wordpress首页侧边栏调用热门文章的调用代码 wordpress调用热门文章列表wordpress首页侧边栏调用热门文章列表wordpress首页调用热门文章wordpress首页调用热门文章列表 分享到: 赞(0)