[wordpress插件] Count Shortcode计数简码

wordpress 插件 文章 2020-04-03 10:20 423 0 全屏看文

AI助手支持GPT4.0

评分
80
描述

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]

库存红色汽车:[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)

将返回汽车数量,以及指向yoursite.com/?color=red的链接(可能会根据您的永久链接结构进行重写)

Usage

用法

Insert a shortcode in your post in the form of [count {taxonomy}={value}].

以[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.)

您还可以使用post_type参数指定帖子类型(页面,帖子,汽车等)

List Usage

列表使用情况

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

您可以计算分类法中的所有术语,例如[list-counts分类法=“标签”]或所有分类法中的所有术语[list-counts]。

安装步骤

    1. Install the plugin as you would any other plugin
    2. 像安装其他任何插件一样安装插件

下载地址
https://downloads.wordpress.org/plugin/count-shortcode.zip
-EOF-

AI助手支持GPT4.0