该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Count Shortcode

描述

Shortcode to count number of posts that match a given set of criteria; provides link to query to display list of matching posts.

Works with both built in post types (pages, posts) and taxonomies (tags, categories), as well as custom post types and custom taxonomies.

Example

You have a car custom post type and would like a count of all the red cars in your inventory, as well as a link to a listing of those cars.

Red Cars in Inventory: [count color=red]

Would return the number of cars, as well as a link to yoursite.com/?color=red (which may rewrite depending on your permalink structure)

Usage

Insert a shortcode in your post in the form of [count {taxonomy}={value}]. You can add as many or as fiew taxonomies as you would like.

You can also use the post_type argument to specify a post type (page, post, car, etc.)

List Usage

You can count all terms within a taxonomy, e.g., [list-counts taxonomy=”tags”] or across all taxonomies [list-counts].

安装

  1. Install the plugin as you would any other plugin

评价

此插件暂无评价。

贡献者及开发者

“Count Shortcode” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

将“Count Shortcode”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

2.0

  • Added ability to display counts of all terms in a taxonomy, or across all taxonomies

1.0

  • Initial Release