plugin-icon

Limit parameter for gallery shortcode

作者:nboehr·
Adds a limit parameter to the [gallery] shortcode.
评级
5/5
版本
2.0
活跃安装
30
最后更新
Dec 8, 2016

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.

免费使用Business套餐
通过安装,您同意 WordPress.com 服务条款第三方插件条款
目前已测试版本
WordPress 4.4.34
这个插件是可用的下载,适用于您的站点。