[wordpress插件] Category Based Archives基于类别的档案

wordpress 插件 文章 2020-03-18 05:20 490 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

The archives within WordPress are pretty limited in a sense that they do not offer much configuration beyond what they do.

从某种意义上来说,WordPress内的档案非常有限,因为它们没有提供太多的配置。

Date based will be date based, like category based archives will only display categories.

基于日期将基于日期,例如基于类别的存档将仅显示类别。

This plugin mitigates the issue by giving date based archives the ability to list content by categories as well.

该插件还使基于日期的归档文件也可以按类别列出内容,从而缓解了该问题。

This is done via modification of the rewrite rules to allow for the ability to have permalinks like http://yourblog.com/2008/in-blog/.

这是通过修改重写规则来完成的,以允许具有诸如http://yourblog.com/2008/in-blog/之类的永久链接。

This basically is a date based archive that shows only entries from the “blog” category.

这基本上是一个基于日期的存档,仅显示“博客”类别中的条目。

This plugin can also work without the usage of rewrite rules.

此插件也可以使用,而无需使用重写规则。

It currently supports date based archives for years and months.

目前,它支持基于日期的存档,长达数年和数月。

Usable Commands for Theme Developers

主题开发人员可用的命令

The PHP commands for theme developers to use are pretty straight forward.

供主题开发人员使用的PHP命令非常简单。

cba_get_category_id() returns the current category ID of the archive.

cba_get_category_id()返回档案的当前类别ID。

cba_the_year() returns the current year of the date based archive.

cba_the_year()返回基于日期的存档的当前年份。

cba_the_month() returns the current month of the date based archive.

cba_the_month()返回基于日期的存档的当前月份。

cba_auto_thedate() gets the string representation of the date.

cba_auto_thedate()获取日期的字符串表示形式。

cba_get_year_link($year) returns the permalink for the year archive based on the current category.

cba_get_year_link($ year)返回基于当前类别的年份归档的永久链接。

安装步骤

    1. Upload category-based-archives.php into your plugins folder.
    2. 将category-based-archives.php上传到您的plugins文件夹中。

    3. Activate and you’re done.
    4. 激活即可完成。

下载地址
https://downloads.wordpress.org/plugin/category-based-archives.1.0.5.zip
-EOF-

AI助手支持GPT4.0