[wordpress插件] Category Shortcode类别简码

wordpress 插件 文章 2020-03-18 16:50 560 0 全屏看文

AI助手支持GPT4.0

评分
80
描述

This plugin creates the [Category]] Shortcode.

此插件创建[Category](简写)代码。

The code takes 5 arguments:

该代码有5个参数:

number: the number of posts to display.

number:要显示的帖子数。

0 equals the default number.

0等于默认数字。

-1 equals the total available.

-1等于总可用量。

Order: Ascending or Descending

顺序:升序或降序

Display Method: Full, Excerpt, Title

显示方式:完整,摘录,标题

Order By: Author, Date, Title, Modified, Parent, ID, Rand, None, or Comment Count.

排序依据:作者,日期,标题,已修改,父项,ID,兰特,无或评论数。

Category: this is the category id the category or categories that should be searched.

类别:这是类别ID,应搜索的一个或多个类别。

Multiple categories can be specified in a comma separated list.

可以在逗号分隔的列表中指定多个类别。

Example shortcode:

简码示例:

[Category number=’5′ method=’title’ order=’asc’ id=’11,45′ orderby=’comment_count’]

[类别编号='5'方法='标题'order ='asc'id = '11,45'orderby ='comment_count']

This will show 5 posts in ascending order of category 11 and 45 as arranged by comment_count and will display just the post titles.

这将按comment_count的顺序显示5个帖子,按类别11和45的升序排列,并且仅显示帖子标题。

Acknowledgements

致谢

A big thank you to g33kg0dd3ss for figuring out the 1.3 fix issue with the loop being broken.

非常感谢g33kg0dd3ss弄清楚了1.3修复问题(循环中断)。

She contributed the patch fix.

她贡献了补丁修复程序。

Future Additions?

未来的补充?

    1. Let plugin form allow for multiple category selections

      让插件形式允许多个类别选择

    2. Let plugin form allow for multiple orderby methods

      让插件形式允许多种orderby方法

    3. In admin form restrict Number of posts to numbers only.

      在管理员表单中,将帖子数限制为仅数字。

    4. In admin form setup a copy and paste script

      在管理表单中设置复制和粘贴脚本

    5. Accept a category name as a valid input

      接受类别名称作为有效输入

    6. Internationalization of the plugin

      插件的国际化

    7. Improve Formatting of Posts / Make formatting easier to edit./ Give user more control over formatting

      改善帖子格式/简化格式设置//让用户更好地控制格式

    8. Allow attachments to come through

      允许附件通过

    9. Turn title links on or off.

      打开或关闭标题链接。

    10. Allow comments in output

      在输出中允许注释

    11. Give user more control over the postformatting

      赋予用户对后格式的更多控制权

    12. Add ability to modify thumbnail options through shortcode

      添加了通过简码修改缩略图选项的功能

安装步骤

    1. Upload the category_shortcode directory to the /wp-content/plugins directory
    2. category_shortcode 目录上传到 / wp-content / plugins 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Place a valid [Category] code into a page.
    6. 在页面中放置有效的[Category]代码。

下载地址
https://downloads.wordpress.org/plugin/category-shortcode-w-generator.1.3.zip
-EOF-

AI助手支持GPT4.0