WordPress 2.3 plugin:Related posts 2.3

Sunday September 23, 2007

English

This plugin is only available from WordPress 2.3 beta 1 and later

=== Plugin info ===

Name: Related Posts 2.3
Requires at least: 2.3 beta 1

Related Posts 2.3 Plugin will generate a list of related posts of current tags, only for wordpress 2.3

== Description ==

Related Posts 2.3 Plugin will generate a list of related posts of current tags, only for wordpress 2.3

== Installation ==

1. Upload whole folder to the `/wp-content/plugins/` directory
1. Activate the plugin through the ‘Plugins’ menu in WordPress
1. Place the code in your templates

<?php related_posts(); ?>

== plugin download ==

中文

Related posts 2.3 是一款用于在 wordpress 中显示相关文章列表的插件。

插件说明

wordpress 2.3 明天发布,带来期待的 tag 功能的同时,也带来了较大数据结构的改变,原来的 Related posts 在 wordpress 2.3 中失效,于是我动手写了一个只用于 wordpress2.3 的 Related posts 插件,参考了原来的 Related posts ,所以基本上属于半原创了。

插件下载:

使用方法:

  1. 解压,上传到 wp_content/plugins 目录下
  2. 在相关模版中添加输出代码
  3. 后台激活

注意事项:

由于本人水平有限,且 wordpress2.3 的数据表结构改动比较大,此插件只用于 wordpress 2.3 。

代码添加:

在相应的模版中添加如下代码,我一般添加在 sidebar.php 中,可自定义样式输出,大部分主题已默认支持此插件。

<?php /* Related Posts */ if ((function_exists('related_posts')) and is_single() and ($notfound != '1')) { ?> 
	<h3><?php _e('Related Posts'); ?></h3>
	<ul><?php related_posts(); ?></ul>
<?php } ?>

3 Comments

  1. 等我再次升级了之后,来体验一下。

  2. 您好,请问一下
    如果想在文章标题之后加上发表日期
    不知道应该如何修改代码呢?谢谢

  3. @梵 推荐你使用 simple tags 这个插件输出相关文章列表,这个插件可以指定输出格式的.

Leave a reply