wordpress如何无插件调用最新、热门、随机文章?
WordPress无插件调用最新、热门、随机文章实例代码
推荐:《wordpress教程》
WordPress无插件调用最新、热门、随机文章,具体实现代码如下,感兴趣的朋友可以参考下哈,希望对大家在新闻调用上有所帮助
调用最新文章:
代码如下:
<ul><?php$post_query=newWP_Query(‘showposts=10′);while($post_query->have_posts()):$post_query->the_post();$do_not_duplicate=$post->ID;?><li><ahref=”<?phpthe_permalink();?>”><?phpthe_title();?></a></li><?phpendwhile;?></ul>