Linux 软件免费装

Plugin Name

开发者 billerickson
更新时间 2011年8月18日 00:32
捐献地址: 去捐款
PHP版本: 3.2 及以上
WordPress版本: 3.2.1

标签

post taxonomy next previous patch

下载

详情介绍:

If you use next_post_link('%link', '%title', true) or previous_post_link('%link', '%title', true) to get the adjacent post for a custom post type which has a taxonomy assigned to it, it doesn't work as intended. Those functions are all hardcoded to look to the taxonomy 'category'. This patch let's you change that if you'd like. If you have a custom post type 'product' with a taxonomy 'color' and want the prev/next post links on the single product page to go to similarly colored ones, use this: be_previous_post_link('%link', '%title', true, '', 'color'); be_next_post_link('%link', '%title', true, '', 'color'); Please post any issues you find on the Trac ticket so the core patch can be updated: http://core.trac.wordpress.org/ticket/17807 Functions available: Please see the source of the plugin for documentation. They should work just like the original functions, except they now accept an additional parameter, $taxonomy, that's set to 'category' by default.

安装:

This section describes how to install the plugin and get it working. e.g.
  1. Upload 'previous-and-next-post-in-same-taxonomy/' to the '/wp-content/plugins/' directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Place one of the functions in your template. Ex: '<?php be_previous_post_link('%link', '%title', true, '', 'color'); ?>'

更新日志:

1.0