內容簡介
簡易文章滑動器(Simple Post Slider)是一個靈活的 WordPress 外掛,讓您可以使用自訂文章來建立滑動器。您可以展示圖像或影片,設置自動播放、滑動速度、可見幻燈片數量等功能。
每個滑動器都有其自己的捷徑代碼,您可以將其添加到網站上的任何位置。滑動器具有響應式設計、平滑處理,當您懸停在幻燈片上時會暫停。
適合以引人注目且使用者友好的滑動器格式來展示您的內容。
特色
使用自訂文章類型創建無限數量的滑動器。
為每個滑動幻燈片添加特色圖像或影片。
自訂滑動器行為:自動播放、循環、速度、幻燈片數量等。
為每個滑動器選擇特定文章。
為每個滑動器生成捷徑代碼。
使用 Swiper.js 實現響應式和觸控友好功能。
懸停時暫停自動播放。
管理員安裝程序:透過搜尋
造訪「新增外掛」畫面並搜尋「Post Featured Video and Layout Designer」。
點選「立即安裝」按鈕。
啟用外掛。
管理員安裝程序:透過 ZIP 檔
下載外掛。
解壓縮 ZIP 檔並上傳。
透過 WordPress 中的「外掛」選單啟用外掛。
使用方法
建立滑動器
1.建立滑動器:
安裝並啟用外掛後,前往 WordPress 管理員側邊欄中的「文章類型滑動器」。
點選「新增」以建立新的滑動器。
為您的滑動器命名並配置設置(例如:自動播放、速度、每頁顯示滑片數)。
2.選擇滑動器的文章:
在「選擇文章」元框下,勾選要包含在滑動器中的文章。
您可以選擇展示在滑動器中的任意文章數量。
3.設置特色內容:
您可以為將顯示在滑動器上的每個文章添加特色圖片或特色影片。
使用文章編輯器中的「特色影片 URL」選項添加影片 URL。
如果文章沒有特色影片,外掛將後退到特色圖像。
4.配置滑動器設置:
選擇是否啟用滑動器的自動播放。
調整幻燈片的速度(毫秒)。
使用「每頁顯示幻燈片」設置來選擇一次顯示多少幻燈片。
自訂額外的設置,如循環行為和導航箭頭。
5.生成捷徑代碼:
保存滑動器後,在滑動器編輯頁面上會看到一個「滑動器捷徑」框。
複製捷徑代碼,其格式類似:[post_type_slider id="123"]。
將捷徑代碼粘貼到您的網站上的任何地方,即可在文章、網頁或小工具中顯示滑動器。
外掛標籤
開發者團隊
原文外掛簡介
Simple Post Slider is a flexible WordPress plugin that lets you create sliders using your custom posts. You can show images or videos, set autoplay, slide speed, number of visible slides, and more.
Each slider has its own shortcode that you can add anywhere on your site. Sliders are responsive, smooth, and pause when you hover over a slide.
Ideal for displaying your content in an attractive, user-friendly slider format.
Features
Create unlimited sliders using a custom post type.
Add featured images or videos to each slide.
Customize slider behavior: autoplay, loop, speed, slide count, and more.
Select specific posts for each slider.
Generate shortcode for each slider.
Responsive and touch-friendly using Swiper.js.
Pause autoplay on hover.
Admin Installer via search:
Visit the Add New plugin screen and search for “Post Featured Video and Layout Designer”.
Click the “Install Now” button.
Activate the plugin.
Admin Installer via zip:
Download the Plugin.
Extract the ZIP file and upload.
Activate the plugin through the “Plugins” menu in WordPress.
Usage
Creating a Slider
1.Create a Slider:
After installing and activating the plugin, go to Post Type Slider in the WordPress admin sidebar.
Click Add New to create a new slider.
Give your slider a title and configure the settings (e.g., Autoplay, Speed, Slides per view).
2.Select Posts for the Slider:
Under the “Select Posts” meta box, choose which posts you want to include in the slider by checking the boxes next to the posts.
You can select as many posts as you want to display in the slider.
3.Set Featured Content:
You can add a featured image or a featured video for each post that will be displayed on the slider.
Use the Featured Video URL option in the post editor to add a video URL.
If the post does not have a featured video, the plugin will fall back to the featured image.
4.Configure Slider Settings:
Choose whether to enable Autoplay for the slider.
Adjust the Speed of the slides (in milliseconds).
Select how many slides should be visible at a time using the Slides per View setting.
Customize additional settings like loop behavior and navigation arrows.
5.Generate Shortcode:
After saving the slider, you’ll see a Slider Shortcode box on the slider edit page.
Copy the shortcode, which will look something like this: [post_type_slider id="123"].
Paste the shortcode anywhere on your site, in posts, pages, or widgets, to display the slider.
Code Example
Registering Admin Menu:
function pts_add_featured_video_meta_box() {
add_meta_box(
‘spst_featured_video’,
‘Featured Video’,
‘spst_render_featured_video_box’,
‘post’,
‘side’,
‘default’
);
}
