wordpress冷评文章插件

中文名:wordpress冷评文章插件

English name:Least commented posts plugins

作者(Author):小可 (xiaoke)

版本(Version):1.0.0.1

下载(down):http://wordpress.org/extend/plugins/least-commented-posts/

功能:Least commented posts plugins  -  作者:小可。感谢老唐的帮助,没有他,这个插件不能面世。在侧边栏列出评论最少的文章,当然,你也可以修改成评论最多的文章,把ASC改成DESC就可以了,不过要到修改文件中去改,把其中$cold_post_order = ASC 的ASC修改成DESC就是热评文章了。

Function:Author: Xiao Ke. Thank help of Laotang, without him, this plug-in is not available. Comment least listed in the sidebar article, of course, you can also modify the Most articles changed to ASC DESC on it, however, to modify the file to change. which $ cold_post_order = ASC ASC modified DESC is Lively article.

这个冷评文章插件呢,我是参照下面的代码开发的。

Least commented posts plugins I refer to the following code development.

  1. <?php $pop = $wpdb->get_results("SELECT id, post_title, comment_count  
  2. FROM {$wpdb->prefix}posts  
  3. WHERE post_type=’post’ AND post_status=’publish’ AND post_password=”  
  4. ORDER BY comment_count DESC LIMIT 10"); ?>  
  5. <ul>  
  6. <?php foreach($pop as $post) : ?>  
  7. <li><a href="<?php echo get_permalink($post->id); ?>"><?php echo $post->post_title; ?></a></li>  
  8. <?php endforeach; ?>  
  9. </ul> 

代码中的DESC表示降序,将其更改为升序ASC就可以了。更改后的代码如下。

DESC for descending code change ascending ASC can. Changed code is as follows。

  1. <?php $pop = $wpdb->get_results("SELECT id, post_title, comment_count  
  2. FROM {$wpdb->prefix}posts  
  3. WHERE post_type=’post’ AND post_status=’publish’ AND post_password=”  
  4. ORDER BY comment_count ASC LIMIT 10"); ?>  
  5. <ul>  
  6. <?php foreach($pop as $post) : ?>  
  7. <li><a href="<?php echo get_permalink($post->id); ?>"><?php echo $post->post_title; ?></a></li>  
  8. <?php endforeach; ?>  
  9. </ul> 

本来我就是用这段代码的,后来发现在侧边栏移动不方面,所以才打算开发这样的插件。

本插件让你罗列出最少评论的文章,让一些被遗忘的优秀文章得以重见天日,欢迎大家的使用,也希望你们能够喜欢,谢谢。

Originally, I was using this code, the later movement is not found in the sidebar, so it intends to develop such a plug-in.

The plug-ins let you list at least reviewed papers, excellent article brought to light forgotten, welcome everyone to use, and also hope you will like it, thank you.

下载地址DOWN:本地下载 流量太耗,去官网下载吧。 官方下载