Title: Limit parameter for gallery shortcode
Author: nboehr
Published: <strong>September 21, 2014</strong>
Last modified: December 8, 2016

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

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

# Limit parameter for gallery shortcode

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

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

 * [Details](https://co.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#description)
 * [Reviews](https://co.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#reviews)
 *  [Installation](https://co.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#installation)
 * [Development](https://co.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/#developers)

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

## Description

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.

## Installation

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

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Limit parameter for gallery shortcode” is open source software. The following people
have contributed to this plugin.

Contributors

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

[Translate “Limit parameter for gallery shortcode” into your language.](https://translate.wordpress.org/projects/wp-plugins/limit-parameter-for-gallery-shortcode)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/limit-parameter-for-gallery-shortcode/),
check out the [SVN repository](https://plugins.svn.wordpress.org/limit-parameter-for-gallery-shortcode/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/limit-parameter-for-gallery-shortcode/)
by [RSS](https://plugins.trac.wordpress.org/log/limit-parameter-for-gallery-shortcode/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.0

Added offset parameter.

#### 1.0

First release.

## Meta

 *  Version **2.0**
 *  Last updated **9 years ago**
 *  Active installations **20+**
 *  WordPress version ** 4.0 or higher **
 *  Tested up to **4.4.34**
 *  Language
 * [English (US)](https://wordpress.org/plugins/limit-parameter-for-gallery-shortcode/)
 * Tags
 * [gallery](https://co.wordpress.org/plugins/tags/gallery/)[images](https://co.wordpress.org/plugins/tags/images/)
   [limit](https://co.wordpress.org/plugins/tags/limit/)[shortcode](https://co.wordpress.org/plugins/tags/shortcode/)
 *  [Advanced View](https://co.wordpress.org/plugins/limit-parameter-for-gallery-shortcode/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/?filter=2)
 *  [  0 1-star reviews     ](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)

[See all reviews](https://wordpress.org/support/plugin/limit-parameter-for-gallery-shortcode/reviews/)

## Contributors

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

## Support

Got something to say? Need help?

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