內容簡介
這個外掛提供在文章和頁面上附帶現有的 Soliloquy Slider 的 metabox。使用者可以透過 meta 資料與文章或頁面關聯,並選擇其中一個 Slider。
實際上,擷取其他 Slider 正確運作像是擷取 Featured Images 一樣。文章或頁面只是與 Featured Sliders 附加,您必須使用模板標記或 WordPress 函數來渲染 Slider。
請參閱其他注意事項以獲取範例。
用法
文章或頁面的 meta 擁有一個名為 _t1k_featured_slider 的鍵。渲染 Slider 的一種簡單方式如下:
<?php
$meta = get_post_custom();
if ( isset( $meta['_t1k_featured_slider'][0] ) && is_numeric( $meta['_t1k_featured_slider'][0] ) && function_exists( 'soliloquy' ) ) {
soliloquy( absint( $meta['_t1k_featured_slider'][0] ) );
}
?>
外掛標籤
開發者團隊
原文外掛簡介
This plugin provides a metabox on posts and pages listing existing Soliloquy Sliders. The end user is allowed to choose one and make it associated with the post or page via meta data.
Practically speaking, Featured Sliders work exactly like Featured Images. The Post or Page and Featured Sliders are merely attached, and you must use a template tag or WordPress functions to render the Slider.
Please see Other Notes for examples.
Usage
Page or Post meta has a key called _t1k_featured_slider. A very simple way to render the slider is like this:
