
內容簡介
這款外掛提供自定義文章類型選擇圖像和內容,並使用短代碼 [image-carousel] 從 Twitter Bootstrap 輸出 輪播。
插件假設您已經在使用 Bootstrap,因此需要單獨加載 Bootstrap JavaScript 和 CSS。
下載 Twitter Bootstrap
Bootstrap CDN(熱連接 CSS 和 JavaScript 文件)
Bootstrap 輪播參考
這款插件可從 WordPress 插件目錄中獲得:https://wordpress.org/plugins/cpt-bootstrap-carousel/。
該插件的源代碼由 GitHub 維護:https://github.com/ewels/cpt-bootstrap-carousel。
短代碼選項
從版本 1.5 開始,幾乎所有這些選項都可以在 CPT Bootstrap 輪播設置頁面中設置。但是,如果您需要不同的輪播設置,可以使用短代碼選項覆蓋以下選項...
interval(默認值 5000)
每個圖像的字幕暫停的時間長度。時間以毫秒為單位。
[image-carousel interval="12000"]
showcaption(默認值 true)
是否顯示每個圖像上的文字標題。 true 或 false。
[image-carousel showcaption="false"]
showcontrols(默認值 true)
是否顯示控制箭頭。 true 或 false。
[image-carousel showcontrols="false"]
orderby 和 order(默認值 menu_order ASC)
顯示文章的順序。使用 WP_Query terms。
[image-carousel orderby="rand"]
[image-carousel orderby="date" orderby="DESC"]
category(默認值 all)
按小部件分類磁片上的逗號分隔列表篩選輪播項目。
[image-carousel category="homepage,highlights"]
id(默認值 all)
指定要顯示的具體輪播帖子的 ID。
通過查看編輯帖子連結找到圖像 ID,例如,帖子 109 將為 /wp-admin/post.php?post=109&action=edit
[image-carousel id="109"]
twbs(默認值 2)
輸出用於 Twitter Bootstrap 版本 2 或 3 的標記。
[image-carousel twbs="3"]
信用
這款插件由 @tallphil 編寫,並得到了多位其他人(但不限於)的幫助和建議,包括 @reddo、@joshgerdes、@atnon、@grahamharper、@rchq、@oheijo、@smtk、@cla63、@cookierebes 和 @sipman。
塞爾維亞克羅地亞語翻譯由 Borisa Djuraskovic 提供,來自www.webhostinghub。
外掛標籤
開發者團隊
原文外掛簡介
A custom post type for choosing images and content which outputs a carousel from Twitter Bootstrap using the shortcode [image-carousel].
The plugin assumes that you’re already using Bootstrap, so you need to load the Bootstrap javascript and CSS separately.
Download Twitter Bootstrap
Bootstrap CDN (hotlink CSS and javascript files)
Bootstrap Carousel in action
This plugin is available from the WordPress Plugins Directory: https://wordpress.org/plugins/cpt-bootstrap-carousel/.
The source code is maintained on GitHub: https://github.com/ewels/cpt-bootstrap-carousel.
Shortcode Options
As of version 1.5, nearly all of these options can be set in the CPT Bootstrap Carousel Settings page. However, if you’d like different settings for different carousels, you can override these by using shortcode options…
interval (default 5000)
Length of time for the caption to pause on each image. Time in milliseconds.
[image-carousel interval="12000"]
showcaption (default true)
Whether to display the text caption on each image or not. true or false.
[image-carousel showcaption="false"]
showcontrols (default true)
Whether to display the control arrows or not. true or false.
[image-carousel showcontrols="false"]
orderby and order (default menu_order ASC)
What order to display the posts in. Uses WP_Query terms.
[image-carousel orderby="rand"]
[image-carousel orderby="date" orderby="DESC"]
category (default all)
Filter carousel items by a comma separated list of carousel category slugs.
[image-carousel category="homepage,highlights"]
id (default all)
Specify the ID of a specific carousel post to display only one image.
Find the image ID by looking at the edit post link, eg. post 109 would be /wp-admin/post.php?post=109&action=edit
[image-carousel id="109"]
twbs (default 2)
Output markup for Twitter Bootstrap Version 2 or 3.
[image-carousel twbs="3"]
Credits
This plugin was written by @tallphil with help and suggestions from several others including (but not limited to) @reddo, @joshgerdes, @atnon, @grahamharper, @rchq, @oheijo, @smtk, @cla63, @cookierebes and @sipman.
The Serbo-Croation translation was kindly provided by Borisa Djuraskovic from http://www.webhostinghub.com
The Spanish translation was provided by Chema Bescós from IBIDEM GROUP (https://www.ibidemgroup.com)
Contributing
If you would like to contribute to this plugin, please make a personal fork of the GitHub repository and then submit a pull request. For more details please see the contributing guide.
