這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

No BS Image Slider

描述

This is an ultra-minimal no-frills responsive and accessible image carousel / slider.

There are many robust image slider plugins already. They work well and have a lot of features, some with even more features at the premium tier.
I’m not saying that they don’t have their place but that sometimes they are excessive.

This plugin is for someone who just wants to have linked images scroll by in a loop on their website.

How To Use

No BS Image Slider works by leveraging what WordPress already provides, by creating a new custom post type and taxonomy.

  1. To begin, create your slides by using the Image Slide type. Be sure to add a featured image, and provide a link in the link field. Captions can be supplied by filling out the exerpt.
  2. Create a slider by adding an Image Slider taxonomy. This allows a slide to be in multiple sliders.
  3. Use the No BS Image Slider widget to configure which slider you want displayed, and the duration of each slide.

A great rundown of the plugin is available on the Planetjon blog.

Shortcode

To manually insert a slider, use the shortcode [nbis].
You must provide at minimum the slider slug.

The shortcode attributes are

  • slider=”slug”
  • duration=”number” (seconds, default 5)
  • transition=”number” (seconds, default 1.25)
  • showcounter=”yes|no” (default no)
  • lazy=”yes|no” (default no)

Widget

A widget that exposes all of the above options is available.

常見問題

What makes this light-weight?

No BS Image Slider has minimal backend coding and zero external dependencies.
The slider is also optimized purely with CSS, no JavaScript is used.
The CSS weighs in at under 2 kilobytes, blowing away all of the major slider plugins by a mile.

How can I set the order of slides in a slider

While there are no admin options for this, it can be done by using custom CSS.
Sliders are ID’d with no-bs-image-slider-<slug> and slides are ID’d with nbis-slide-<slideId>.

An approach would be to style the slider scrollpane as Flexbox, and set the order on the slides.

#no-bs-image-slider-slug .scrollpane {
display: flex;
}
#no-bs-image-slider-slug .scrollpane #nbis-slide-1 {
order: 1;
}
#no-bs-image-slider-slug .scrollpane #nbis-slide-2 {
order: 0;
}

評價

2021年7月13日 1 reply
Being a minimalist, and needing a replacement for a slider plugin now abandoned, I found this plugin - and reading the description I thought "Wow, sounds great". And it is. After installing it (it's a small but non-trivial learning curve to use) I downloaded and unpacked the source. I could hardly believe my eyes! One PHP file, 8.665 bytes; and one CSS file, 1.429 bytes. That's IT. And btw it's really well written, the author is obviously a good, modern programmer. The sliders are custom 'tags', the slider images are custom posts (I think). Strange is, that you have to supply a 'Featured Image' and an image link for each slide, then it works - slides shown in the order of their creation. Just change the creation date to modify the order (untried). One thing I found not so obvious in the UI at first: On hover over the slider then a 'paused' icon is displayed top left and the slider is indeed paused. As soon as the mouse goes away, the icon disappears and the animation continues. But at first I thought the paused icon was a button to click to cause a pause, and since it did not I thought the plugin was broken. Silly me, but perhaps there is a way to do it even more clearly? It is now live on the homepage of a german apothecary. BTW minimalists might want to pair this with WP Featherlight as a lightbox. 5 stars really well earned - thanks Jonathan!
閱讀全部1個評價

貢獻者及開發者

“No BS Image Slider” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 No BS Image Slider 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.8

  • Transition duration parameter added.