Title: Limit parameter for gallery shortcode
Author: nboehr
Published: <strong>2014 年 9 月 21 日</strong>
Last modified: 2016 年 12 月 8 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/limit-parameter-for-gallery-shortcode.
svg)

# Limit parameter for gallery shortcode

 作者：[nboehr](https://profiles.wordpress.org/nboehr/)

[下载](https://downloads.wordpress.org/plugin/limit-parameter-for-gallery-shortcode.zip)

 * [详情](https://cn.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#description)
 * [评价](https://cn.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#developers)

 [支持](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/)

## 描述

By default, the gallery shortcode does not allow to limit the number of images displayed.
This makes sense when you for example include all images attached to a post like
this:

    ```
    [gallery id="4"]
    ```

When this plugin is activated, you may use:

    ```
    [gallery id="4" limit="3"]
    ```

and it will only display three images.

You can also use an offset parameter:

    ```
    [gallery id="4" limit="3" offset="1"]
    ```

Will display at most three images, starting at the second.

Note that this plugin is a little bit of a hack.

## 安装

 1. Upload the `gallery-limit.php` file to the plugin directory.
 2. Activate the plugin.
 3. Done.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Limit parameter for gallery shortcode」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ nboehr ](https://profiles.wordpress.org/nboehr/)

[帮助将「Limit parameter for gallery shortcode」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/limit-parameter-for-gallery-shortcode)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/limit-parameter-for-gallery-shortcode/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/limit-parameter-for-gallery-shortcode/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/limit-parameter-for-gallery-shortcode/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/limit-parameter-for-gallery-shortcode/)。

## 更新日志

#### 2.0

Added offset parameter.

#### 1.0

First release.

## 额外信息

 *  版本 **2.0**
 *  最后更新：**9 年前**
 *  活跃安装数量 **20+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.4.34**
 *  语言
 * [English (US)](https://wordpress.org/plugins/limit-parameter-for-gallery-shortcode/)
 * 标签
 * [gallery](https://cn.wordpress.org/plugins/tags/gallery/)[images](https://cn.wordpress.org/plugins/tags/images/)
   [limit](https://cn.wordpress.org/plugins/tags/limit/)[shortcode](https://cn.wordpress.org/plugins/tags/shortcode/)
 *  [高级视图](https://cn.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/)

## 贡献者

 *   [ nboehr ](https://profiles.wordpress.org/nboehr/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/)