开发者 | celloexpressions |
---|---|
更新时间 | 2024年7月13日 07:13 |
PHP版本: | 3.8 及以上 |
WordPress版本: | 6.6 |
版权: | GPLv2 |
http://yourdomain.com/slideshow
. All JPEG images will be displayed (since .jpg is best for pictures, while .png and .gif are typically used for graphics).
Please note that it is not currently possible to pause the slideshow or go back; the slideshow is not designed for personal viewing. However, clicking/tapping on the image will open its attachment page in a new tab, allowing images to be contextualized or edited easily.
The slideshow can also be embedded into your site via a widget or a shortcode.
You can control some options by adjusting the url of the slideshow. Parameters are controlled via query string (and widget options and shortcode attributes).
size
is the size of the image to load, either thumbnail
(discouraged), medium
, large
, full
, or auto
, which uses medium or large depending on wp_is_mobile()
.year
is the 4-digit numeric year in which the images were published.month
is the numeric month in which the images were published (between 1 and 12), typically but not necessarily used in conjunction with year
.mode
defines a subset of images to use, such as featured
for featured images only.captions
controls the captions display: either auto
, none
, title
, titlecaption
, caption
, or description
. Caption data is read from the image attachment post and can be updated in the media library./wp-content/plugins/
directoryhttp://yourdomain.com/slideshow
to see the slideshow in action. Add a widget version from the Widgets section in the Customizer or add the [content_slideshow] shortcode to a post or page.For simplicity's sake, no settings page is included. Settings for this plugin tend to depend on the exact situation in which you are using it, so rather than going to the setting page every time you want to use it, you can adjust the parameters via tweaks to the slideshow url (see details below).
This plugin overrides WordPress at the slideshow/
url. If you have a post/page with that slug, it will no longer be accessible on the front-end. This may be desired; for example, you could create an empty slideshow page so that you have a record of the plugin's presence and can more easily add it to navigation menus. You don't have to have a page thee, though, and you can manually add the slideshow URL to your navigation menus.
You can force the plugin to always show the highest resolution pictures available by using the size
query argument (http://example.com/slideshow?size=full
). Note that this could cause speed issues with loading the images if your internet connection or your web server is slow.
The plugin supports year
and month
parameters that can be used to only show images uploaded in a given time period (see the description for an example).
The shortcode version supports all four parameters that the full URL version supports, as attributes:
[content_slideshow size="medium" year="2014" month="1" mode="featured"]
wp_attachment_context
from the slideshow (site icons, cropped header images, etc).