
內容簡介
bxSlider為WordPress整合了優質的響應式內容滑動(bxSlider jQuery plugin),可將相冊轉換為漂亮的滑動器,但您也可以使用特殊的簡碼創建自己的滑動器。最好的是您不會受限於每頁的滑動器或相冊數量,可以按需添加您想要的數量!
為什麼要使用此滑動器?我引用bxSlider網站上的話:
- 完全響應式-適應任何設備
- 水平,垂直和淡化模式
- 幻燈片可以包含圖像、視訊或HTML內容
- 內置進階的觸摸/滑動支援
- 使用CSS轉換進行幻燈片動畫(本機硬體加速!)
- 完整的回調API和公共方法
- 文件大小小,完全主題化,易於實現
- 瀏覽器支援:Firefox,Chrome,Safari,iOS,Android,IE7+
語言
bxSlider for WordPress已翻譯成以下語言:
- 英語(及英國英語)
- 德語
- 西班牙語
您想幫助將外掛程序翻譯成更多語言嗎?請加入我們的WP-Translations社群。
特點
- 和 [bxgallery] 簡碼
- [slider]和 [bxslider] 簡碼
- 模板函數
和 [bxgallery] 簡碼
您可以使用默認的WordPress 簡碼或使用額外的[bxgallery]簡碼創建很棒的動態相冊。這些簡碼具有以下參數:
- ids [逗號分隔的圖像ID列表]:當您從媒體框中創建相冊時,通常會插入這些。如果省略此參數,將包括您已上傳的帖子中的所有圖像。
- exclude_featured [1或0]:如果設置為1且您未像上述那樣指定特定ID,帖子的特色圖像將不會包括在相冊中。如果省略此參數,它將默認為在插件設置頁面中設置的值。
- hide_carousel [1或0]:如果設為1,將不會顯示帶有縮略圖的車輪。如果省略此參數,它將默認為在插件設置頁面中設置的值。
- duration整數:滑塊幻燈片的持續時間(以毫秒為單位)。
- speed整數:過渡速度(以毫秒為單位)。
- extra_options逗號分隔的JavaScript選項列表,直接傳遞給bxSlider:如果這些選項尚未由我們的插件提供作為設置或簡碼參數,這允許直接為bxSlider指定一些選項。例如:[bxgallery extra_options =“pager:false,”]
- transition 'fade','horizontal'或'vertical':幻燈片之間過度的類型
- adaptive_height [1或0]:如果設置為1,滑塊/相冊的高度將根據當前幻燈片的內容自動調整。
- auto_start [1或0]:如果設為1,在頁面加載後,幻燈片/相冊將自動啟動。
- shuffle [1或0]:如果設置為1,圖像將以隨機順序顯示。
[slider] 和 [bxslider] 簡碼
您還可以創建自己的自定義滑塊,其中可包含任何內容。
以下是示例:
[slider]
這是我的第一張幻燈片。我可以在其中添加一個圖像,一個視頻或一些文本。
[/slider]
[bxslider]
這是我的第一個幻燈片
這是我的第二個幻燈片
[bxslider]
模板函數
此外,我們還提供了可通過主題文件調用的模板函數。請使用以下代碼來調用相冊滑動器的函數:
$ids = array(1,2,3,4,5);
echo bx_slider_gallery($ids, $slider_settings);
這里的$ids是要顯示的圖像ID列表,$slider_settings是幻燈片的設置。
外掛標籤
開發者團隊
② 後台搜尋「bxSlider integration for WordPress」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
bxSlider for WordPress integrates the great responsive content slider bxSlider jQuery plugin in
your very own WordPress site. Galleries are turned into beautiful sliders, but you can also roll you own sliders using
special shortcode. The best thing is that you are not limited to the number of sliders or galleries per page, you can
have as many as you want!
Why should you use this slider? I’ll quote the bxSlider’s website:
Fully responsive – will adapt to any device
Horizontal, vertical, and fade modes
Slides can contain images, video, or HTML content
Advanced touch / swipe support built-in
Uses CSS transitions for slide animation (native hardware acceleration!)
Full callback API and public methods
Small file size, fully themed, simple to implement
Browser support: Firefox, Chrome, Safari, iOS, Android, IE7+
Languages
Easy Digital Downloads has been translated into the following languages:
English (and British English)
German
Spanish
Would you like to help translate the plugin into more languages? Join our WP-Translations
Community.
Features
and [bxgallery] shortcodes
[slider] and [bxslider] shortcodes
Template functions
and [bxgallery] shortcodes
You can use the default WordPress shortcode or use the additional [bxgallery] shortcode to create awesome
dynamic galleries. These shortcodes take the following parameters:
ids [a comma-separated list of image IDs]: This is usually inserted for you when you create the gallery from the
media box. If you omit this parameter, all the images you have uploaded along with the post will be included in the
gallery.
exclude_featured [1 or 0]: if set to 1 and you did not specify specific ids as above, the post featured image
will be excluded from the gallery. If you omit this parameter, it will default to the value set in the plugin settings
page.
hide_carousel [1 or 0]: if set to 1, the carousel with thumbnails will not be shown. If you omit this
parameter, it will default to the value set in the plugin settings page.
duration integer: the duration of slides in milliseconds
speed integer: the speed of transitions in milliseconds
extra_options comma-separated list of javascript options to be passed to bxSlider directly: this allows to
directly specify some options for bxSlider if those options are not yet provided as settings or shortcode parameters by
our plugin. For instance: [bxgallery extra_options=”pager: false, “]
transition ‘fade’, ‘horizontal’ or ‘vertical’: the type of transition between slides
adaptive_height [1 or 0]: if set to 1, the height of the slider/gallery will automatically adjust to the content
of the current slide
auto_start [1 or 0]: if set to 1, the slideshow will automatically start after the page has loaded.
shuffle [1 or 0]: if set to 1, the images will be shown in random order
[slider] and [bxslider] shortcodes
You can also build your own custom sliders, with any content you’d like in them.
Here is an example:
[slider]
This is my first slide. I can contain any html you like.
[next-slide]
And the shortcode above has made this text be the second slider.
[next-slide]
And thus we are now having the third slide of this slider. Below we close the initial shortcode to notify the end
of the slider. Simple, isn't it?
[/slider]
The shortcode accepts the following parameters:
duration integer: the duration of slides in milliseconds
speed integer: the speed of transitions in milliseconds
extra_options comma-separated list of javascript options to be passed to bxSlider directly: this allows to
directly specify some options for bxSlider if those options are not yet provided as settings or shortcode parameters by
our plugin. For instance: [bxgallery extra_options=”pager: false, “]
transition ‘fade’, ‘horizontal’ or ‘vertical’: the type of transition between slides
adaptive_height [1 or 0]: if set to 1, the height of the slider/gallery will automatically adjust to the content
of the current slide
auto_start [1 or 0]: if set to 1, the slideshow will automatically start after the page has loaded.
Template functions
The plugin also provides template functions to be used in your theme files. Those functions are all static methods of
the class BXSG_ThemeUtils. To be safe, in case the plugin is not active, you should check that the class exists
before calling the functions:
1. Post gallery
1
) ); ?>
Hint: you can pass the shortcode parameters as an array to customize the output
