[wordpress插件] Combine Galleries结合画廊

wordpress 插件 文章 2020-03-28 01:40 441 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

This plugin gives you the ability to use standard WordPress galleries and taxonomies to organize and reuse your images.

此插件使您能够使用标准的WordPress画廊和分类法来组织和重用图像。

Let’s say you’re a builder and you post all your jobs on your site and include an image gallery with each post.

假设您是一名建筑商,并且将所有工作发布在您的网站上,并且每篇文章都包含一个图片库。

Now, suppose you want to display all your job images on a single portfolio page.

现在,假设您要在单个投资组合页面上显示所有工作图像。

What’s the easiest way to do that?

最简单的方法是什么?

Use the following:

使用以下内容:

[combine-galleries]

  [combine-galleries]

Suppose you build patios, decks, and enclosures.

假设您要建造露台,甲板和围栏。

Now, suppose you want to display all your job images, grouped by job type, on a single portfolio page.

现在,假设您要在单个投资组合页面上显示按作业类型分组的所有作业图像。

Categorize your job posts (patio, deck, enclosure) and use the following:

分类您的工作职位(露台,甲板,围墙)并使用以下内容:

[combine-galleries category="patio"]

  [combine-galleries category =“ patio”]

[combine-galleries category="deck"]

[combine-galleries category =“ deck”]

[combine-galleries category="enclosure"]

[combine-galleries category =“ enclosure”]

Finally, suppose you want to create a page optimized for a specific city (let’s use Raleigh).

最后,假设您要创建一个针对特定城市进行优化的页面(让我们使用罗利)。

And, on that page you want to display all your Raleigh jobs grouped by type.

并且,在该页面上,您要显示按类型分组的所有Raleigh作业。

Tag your job posts by city and use the following:

按城市标记您的职位,并使用以下内容:

[combine-galleries category="patio" tag="raleigh"]

  [combine-galleries category =“ patio” tag =“ raleigh”]

[combine-galleries category="deck" tag="raleigh"]

[combine-galleries category =“ deck” tag =“ raleigh”]

[combine-galleries category="enclosure" tag="raleigh"]

[combine-galleries category =“ enclosure” tag =“ raleigh”]

Combine-Galleries allows you to combine and display gallery images from multiple posts based on taxonomy.

Combine-Galleries允许您根据分类法组合和显示来自多个帖子的画廊图像。

The combine-galleries shortcode combines and displays image galleries from posts that match the categories and/or tags you specify.

Combine-galleries简码可以组合并显示与您指定的类别和/或标签相匹配的帖子中的图像库。

You don’t need to categorize or tag your images, just the posts.

您无需对图片进行分类或标记,只需对帖子进行分类即可。

If you just want to display all gallery images on a single page, you don’t need to categorize or tag anything.

如果您只想在一个页面上显示所有图库图像,则无需分类或标记任何内容。

Supports custom types.

支持自定义类型。

Compatible with the WordPress gallery shortcode and WordPress gallery plugins and viewers.

与WordPress画廊短代码以及WordPress画廊插件和查看器兼容。

Quickly and easily create galleries for your archive pages.

快速轻松地为您的存档页面创建图库。

See usage examples and options below…

请参阅下面的使用示例和选项...

If you find this plugin useful, please consider a small donation of $5.

如果您发现此插件有用,请考虑捐赠5美元。

All proceeds go to fund my current feature film project, Mango Dreams.

所有收益将用于资助我目前的故事片项目“芒果梦”。

Usage

用法

There are several options that may be specified using this syntax:

使用此语法可以指定几个选项:

[combine-galleries option1="value1" option2="value2"]

  [combine-galleries option1 =“ value1” option2 =“ value2”]

You can also print a gallery directly in a template like so:

您也可以直接在模板中打印图库,如下所示:

  <?php echo do_shortcode('[[combine-galleries option1 =“ value1”]'); 

?>

Options

----------------------------------------

?>

选项 ----------------------------------------

-------------

-------------

Supported options are listed below.

下面列出了支持的选项。

All options are, well, optional.

所有选项都是可选的。

You are not required to provide any options.

您不需要提供任何选项。

For example, “[combine-galleries]” will work just fine and will display all gallery images from every post and page on your site.

例如,“ [combine-galleries]”可以很好地工作,并将显示您网站上每个帖子和页面上的所有画廊图像。

Default option values are used when options are not specified.

未指定选项时使用默认选项值。

type

类型

Comma delimited list of post types from which to display images.

用逗号分隔的帖子类型列表,从中显示图像。

Custom types are supported.

支持自定义类型。

Default = “page,post”.

默认=“页面,帖子”。

category

类别

Comma delimited list of categories used to filter posts.

逗号分隔的类别列表,用于过滤帖子。

If more than one category is specified, the default behavior is to AND the categories together.

如果指定了多个类别,则默认行为是将这些类别一起 AND

For example, if category=”featured,decks” then only images from posts categorized as both “Featured” and “Decks” will be displayed.

例如,如果category =“ featured,deck”,则仅显示来自分类为“ Featured”和“ Decks”的帖子中的图像。

Category values are case-insensitive.

类别值不区分大小写。

If no category is specified then no filter is applied.

如果未指定类别,则不应用任何过滤器。

By default, all categories are included.

默认情况下,所有类别都包括在内。

tags

标签

Comma delimited list of tags used to filter posts.

逗号分隔的标签列表,用于过滤帖子。

If more than one tag is specified, the default behavior is to OR the tags together.

如果指定了多个标签,则默认行为是将标签一起 OR

For example, if tag=”raleigh,durham,chapel hill” then images from posts tagged as “Raleigh” or “Durham” or “Chapel Hill” will be displayed.

例如,如果标记=“罗利,达勒姆,教堂山”,则将显示来自标记为“罗利”或“达勒姆”或“教堂山”的帖子的图像。

Tag values are case-insensitive.

标签值不区分大小写。

If no tags are specified then no filter is applied.

如果未指定标签,则不应用任何过滤器。

By default, all tags are included.

默认情况下,所有标签都包括在内。

taxonomy_join

taxonomy_join

Specify the boolean operator used to join multiple taxonomies, i.e. categories and tags.

指定用于连接多个分类法(即类别和标签)的布尔运算符。

Combine-galleries does not support custom taxonomies… yet.

组合库不支持自定义分类法…。

The default boolean operator used to join multiple taxonomies is AND.

用于联接多个分类法的默认布尔运算符为 AND

For example, if category=”Patios” and tag=”Denver” then, by default, only images from posts categorized as “Patios” AND tagged as “Denver” will be displayed.

例如,如果category =“ Patios”和tag =“ Denver”,则默认情况下,仅显示来自分类为“ Patios” AND 且标记为“ Denver”的帖子中的图像。

Bool operators include:

布尔运算符包括:

    • AND (Default)
    • AND(默认)

    • OR
    • OR

    category_join

    category_join

    Specify the boolean operator used to join multiple categories.

    指定用于加入多个类别的布尔运算符。

      • AND (Default)
      • AND(默认)

      • OR
      • OR

      tag_join

      tag_join

      Specify the boolean operator used to join multiple tags.

      指定用于连接多个标签的布尔运算符。

        • AND
        • AND

        • OR (Default)
        • OR(默认)

        orderby

        orderby

        Specify the order in which galleries are combined.

        指定画廊的组合顺序。

        Order of galleries is based on their post.

        画廊的顺序基于他们的职位。

        The default is post_date.

        默认值为post_date。

          • ID – order by post ID
          • ID –按帖子ID排序

          • post_author – order by post author
          • post_author –按帖子作者排序

          • post_title – order by post title
          • post_title –按帖子标题排序

          • post_date (Default) – order by post date
          • post_date(默认)–按发布日期排序

          • comment_count – order by post comment count
          • comment_count –按帖子评论数排序

          order

          订单

          Specify the sort order of gallery posts.

          指定图库帖子的排序顺序。

          ASC or DESC (Default).

          ASC或DESC(默认)。

          For example, to sort by post ID from biggest to smallest:

          例如,要按帖子ID从最大到最小的顺序进行排序:

          [combine-galleries orderby=”ID” order=”DESC”]

          [combine-galleries orderby =” ID” order =“ DESC”]

          limitposts

          limitposts

          Limit the number of posts.

          限制帖子数。

          By default there is no limit.

          默认情况下没有限制。

          limitpostimages

          limitpostimages

          Limit the number of images displayed per post.

          限制每个帖子显示的图像数量。

          By default there is no limit.

          默认情况下没有限制。

          columns

          specify the number of columns.

          指定列数。

          The gallery will include a break tag at the end of each row, and calculate the column width as appropriate.

          画廊将在每一行的末尾包含一个break标签,并根据需要计算列宽。

          The default value is 3. If columns is set to 0, no row breaks will be included.

          默认值为3。如果columns设置为0,则不包含任何换行符。

          For example, to display a 4 column gallery:

          例如,要显示4列画廊:

          [combine-galleries columns=”4″]

          [combine-galleries columns =” 4”]

          size

          大小

          Specify the image size to use for the thumbnail display.

          指定用于缩略图显示的图像尺寸。

          Valid values include:

          有效值包括:

            • “thumbnail” (Default)
            • “缩略图”(默认)

            • “medium”
            • “中”

            • “large”
            • “大”

            • “full”
            • “满”

            • Any additional image size registered with add_image_size.
            • add_image_size 注册的任何其他图像尺寸。

            The size of the images for “thumbnail”, “medium” and “large” can be configured in WordPress admin panel under Settings > Media.

            “缩略图”,“中”和“大”图像的大小可以在WordPress管理面板的“设置”>“媒体”下进行配置。

            For example, to display a gallery of medium sized images:

            例如,要显示中等大小的图像库:

            [combine-galleries size="medium"]

              [combine-galleries size =“ medium”]

            Advanced Options

            高级选项

            itemtag

            itemtag

            the name of the XHTML tag used to enclose each item in the gallery.

            用于将图库中的每个项目括起来的XHTML标记的名称。

            The default is “dl”.

            默认值为“ dl”。

            icontag

            图标标签

            the name of the XHTML tag used to enclose each thumbnail icon in the gallery.

            用于将图库中的每个缩略图图标括起来的XHTML标记的名称。

            The default is “dt”.

            默认值为“ dt”。

            captiontag

            标题标签

            the name of the XHTML tag used to enclose each caption.

            用于封闭每个标题的XHTML标记的名称。

            The default is “dd”.

            默认值为“ dd”。

            For example, to change the gallery markup to use div, span and p tags:

            例如,要更改图库标记以使用div,span和p标签:

            [combine-galleries itemtag=”div” icontag=”span” captiontag=”p”]

            [combine-galleries itemtag =“ div” icontag =“ span” captiontag =“ p”]

            link

            链接

            Specify where you want the image to link.

            指定图像要链接的位置。

            If this option is not specified or if no value is given, the image links to the attachment’s permalink.

            如果未指定此选项或未提供任何值,则图像将链接到附件的永久链接。

            Options:

            选项:

              • “file” – Link directly to image file
              • “文件” –直接链接到图像文件

              • “none” – No link
              • “无” –没有链接

              Ignored WordPress Gallery Option

              忽略的WordPress库选项

              id

              id

              specify the post ID.

              指定帖子ID。

              combine-galleries ignores the id option.

              Combine-galleries忽略id选项。

              The design goal of combine-galleries is to combine and display images from multiple posts based on taxonomy.

              组合库的设计目标是基于分类法来组合和显示来自多个帖子的图像。

              The id option is used to display images from just one specific post.

              id选项仅用于显示来自特定帖子的图像。

              If you need to display images from a single post then the gallery shortcode is best.

              如果您需要显示单个帖子中的图像,则最好使用图库短代码。

安装步骤

Upload the plugin to your blog and Activate it.

将插件上传到您的博客并激活它。

Now you are ready to use the combine-galleries shortcode.

现在您可以使用Combine-galleries简码了。

To test your installation,

要测试您的安装,

create a new post, add the following shortcode to the body of your post, and preview:

创建一个新帖子,在您的帖子正文中添加以下简码,然后进行预览:

[combine-galleries limitposts=”50″ type=”page,post” orderby=”post_date” order=”desc”]

[combine-galleries limitposts =” 50” type =” page,post” orderby =” post_date” order =” desc”]

This test should display all WordPress gallery images from your 50 most recent pages/posts.

此测试应显示您最近50条页面/帖子中的所有WordPress画廊图像。

下载地址
https://downloads.wordpress.org/plugin/combine-galleries.zip
-EOF-

AI助手支持GPT4.0