[wordpress插件] Taxonomy Images II分类图像II

wordpress 插件 文章 2020-03-18 10:20 555 0 全屏看文

AI助手支持GPT4.0

评分
74
描述

This plugin allows you to upload images for categories and custom taxonomies, and provides a template tag to show the image(s) in your theme.

此插件可让您上传类别和自定义分类法的图像,并提供模板标签以显示主题中的图像。

To activate the images for a custom taxonomy, go to Settings > Category Images II.

要为自定义分类法激活图像,请进入“设置”>“类别图像II”。

To upload an image for a category, or a term in a custom taxonomy, go to the edit screen for that category or term.

要上传类别或自定义分类中的术语的图像,请转到该类别或术语的编辑屏幕。

Tag: ciii_category_images() && ciii_term_images()

标签:ciii_category_images()&& ciii_term_images()

  <?php ciii_category_images(); 

?>

?>

Used within the loop, the above template tag will show the thumbnails for all the category images for the category of that post.

在循环中使用的上述模板标记将显示该帖子类别的所有类别图像的缩略图。

If some categories have no image, no image is shown for that category (i.e. there is no default image).

如果某些类别没有图像,则不会显示该类别的图像(即没有默认图像)。

You will need to style the HTML output yourself.

您将需要自己设置HTML输出的样式。

  <?php ciii_category_images('category_ids = 37,27'); 

?>

?>

Used anywhere and provided with category IDs, the above template tag will show the thumbnails for all the categories specified.

在任何地方使用并提供了类别ID,上面的模板标签将显示所有指定类别的缩略图。

If some categories have no image, no image is shown for that category (i.e. there is no default image here either).

如果某些类别没有图像,则不会显示该类别的图像(即,此处也没有默认图像)。

(Note that this tag will get confused if you use it outside the loop. If you want to add a single image to your category archive pages, please use ciii_category_archive_image() below.)

(请注意,如果您在循环之外使用此标签,将会使它感到困惑。如果要将单个图像添加到类别存档页面,请使用下面的 ciii_category_archive_image()。)

p>

>

  <?php ciii_term_images('post_tag'); 

?>

?>

Used within the loop, the above template tag will show the thumbnails for all the term images for the specified taxonomy (in this case ‘post_tag’) which are associated with that post.

在循环中使用的上述模板标记将显示与该帖子相关的指定分类法(在本例中为“ post_tag”)的所有术语图像的缩略图。

If some terms have no image, no image is shown for that term (i.e. there is no default image).

如果某些字词没有图片,则不会显示该字词的图片(即没有默认图片)。

You will need to style the HTML output yourself.

您将需要自己设置HTML输出的样式。

  <?php ciii_term_images('post_tag',category_ids = 37,27'); 

?>

?>

Used anywhere and provided with term IDs, the above template tag will show the thumbnails for all the terms specified.

在任何位置使用并提供了术语ID,以上模板标记将显示所有指定术语的缩略图。

If some terms have no image, no image is shown for that term (i.e. there is no default image here either).

如果某些字词没有图片,则不会显示该字词的图片(即此处也没有默认图片)。

You will need to style the HTML output yourself.

您将需要自己设置HTML输出的样式。

You can pass the show_description parameter to not show the term or category description, and the size parameter to specify either 'original' or 'thumbnail'.

您可以传递 show_description 参数以不显示术语或类别描述,并传递 size 参数以指定“原始”或“缩略图”。

>

>

Tag: ciii_category_archive_image()

标签:ciii_category_archive_image()

  <?php ciii_category_archive_image(); 

?>

?>

This tag is designed to be used on the category archive page, either inside or outside the loop.

此标记旨在在循环内或循环外的类别归档页面上使用。

It will show the image for the category in question.You can specify the maximum side of the category image thumbnail in “Settings > Category Images II”.

它将显示相关类别的图像。您可以在“设置>类别图像II”中指定类别图像缩略图的最大边。

You can upload, and delete, images for each category from “Manage > Categories”, click into each category you wish to edit and you'll see the uploading and deletion controls (deletion controls only show up if the category already has an image uploaded

您可以从“管理>类别”中上传和删除每个类别的图像,单击要编辑的每个类别,然后您会看到上传和删除控件(仅当类别已经上传了图像时才会显示删除控件)

).

)。

The HTML output is fairly well classed, but if you need to adapt it you can.

HTML输出的分类相当不错,但是如果您需要对其进行调整。

Create a directory in your theme called “view”, and a directory within that one called “category-images-ii”.

在您的主题中创建一个名为“ view”的目录,并在其中创建一个名为“ category-images-ii”的目录。

Then copy the template files view/category-images-ii/term-images.php from the plugin directory into your theme directory and amend as you need.

然后将模板文件 view / category-images-ii / term-images.php 从插件目录复制到主题目录中,并根据需要进行修改。

If these files exist in these directories in your theme they will override the ones in the plugin directory.

如果这些文件存在于主题的这些目录中,则它们将覆盖plugin目录中的文件。

This is good because it means that when you update the plugin you can simply overwrite the old plugin directory as you haven’t changed any files in it.

这很好,因为这意味着更新插件时,您可以简单地覆盖旧的插件目录,因为其中没有更改任何文件。

All hail John Godley for the code which allows this magic to happen.

所有 John Godley 都提供了使这种魔术发生的代码。

Plugin initially produced on behalf of Puffbox.

插件最初是代表 Puffbox 产生的。

Is this plugin lacking a feature you want?

此插件缺少您想要的功能吗?

I'm happy to accept offers of feature sponsorship: contact me and we can discuss your

我很高兴接受功能赞助的提议:与我联系,我们可以讨论您的问题

ideas.

想法。

Any issues: contact me.

任何问题:与我联系

安装步骤

The plugin is simple to install:

该插件易于安装:

    1. Download category-images-ii.zip
    2. 下载 category-images-ii.zip

    3. Unzip
    4. 解压缩

    5. Upload category-images-ii directory to your /wp-content/plugins directory
    6. category-images-ii 目录上传到您的 / wp-content / plugins 目录

    7. Go to the plugin management page and enable the plugin
    8. 转到插件管理页面并启用插件

    9. Give yourself a pat on the back
    10. 拍拍自己的背

下载地址
https://downloads.wordpress.org/plugin/category-images-ii.1.33.zip
-EOF-

AI助手支持GPT4.0