
內容簡介
總結:這個 WordPress 外掛讓你能夠在你的網站上直接顯示 YouTube 短片,使用乾淨且響應式的配置,適用於所有設備。只需添加你的頻道名稱,自定外觀,並使用短碼在任何地方展示短片。外掛會自動緩存視頻數據以提高加載速度,提供移動設備的最佳化視圖,並讓你控制出現的元素以契合你網站的設計。
問題與答案:
1. 這個 WordPress 外掛的主要功能是什麼?
- 回答:讓你在網站上直接顯示 YouTube 短片,具有乾淨、響應式佈局,適用於所有設備。
2. 這個外掛的使用情境有哪些?
- 回答:包括展示最新短片的內容創作者、展示產品演示或推薦的企業、展示教育內容的教育工作者、展示活動片段的活動網站、以及增強帖子內容的部落客。
3. 使用這個外掛時需要什麼要件?
- 回答:需要 WordPress 5.0 或更高版本、PHP 7.0 或更高版本,以及一個 YouTube API 金鑰來訪問頻道數據。
4. 外掛支援哪些短碼參數?
- 回答:支援的短碼參數包括頻道、短片數、桌面列數、以及緩存時間,讓你可以自定顯示。
5. 外掛連接到哪個外部服務來檢索視頻數據?
- 回答:這個外掛連接到 YouTube Data API v3 來從 YouTube 頻道檢索視頻數據。
這些問題與答案可讓使用者更好地了解這個外掛的功能和操作方式。
外掛標籤
開發者團隊
② 後台搜尋「Display Dynamic Shorts for YouTube With Shortcode」→ 直接安裝(推薦)
原文外掛簡介
Display YouTube Shorts directly on your WordPress site with a clean, responsive layout that works on all devices. Simply add your channel handle, customize the appearance, and use the shortcode to showcase shorts anywhere. The plugin automatically caches video data to improve loading speed, provides mobile-optimized views, and lets you control exactly which elements appear (titles, view counts, durations, etc.) to match your site’s design.
Key Features
Channel Integration: Display Shorts from any YouTube channel using the channel handle
Responsive Design: Optimized grid layout for desktop and smooth slider for mobile devices
Customizable Display: Show or hide video titles, view counts, timestamps, and more
Caching System: Built-in caching to optimize performance and reduce API calls
Easy Implementation: Simple shortcode to add Shorts anywhere on your site
Custom Styling: Adjust colors and layout to match your website’s design
Lightweight & Fast: Optimized code for quick loading times
Use Cases
Content creators showcasing their latest Shorts
Businesses featuring product demonstrations or testimonials
Educators displaying educational content
Event websites highlighting event clips
Bloggers enhancing posts with relevant video content
How to Use
Simply use the [dyshorts] shortcode to display Shorts on any page or post. You can customize the display using various shortcode attributes:
[dyshorts channel="ChannelName" max="10" columns="4" cache="3600"]
Requirements
WordPress 5.0 or higher
PHP 7.0 or higher
YouTube API Key (for accessing channel data)
Shortcode Parameters
The plugin supports the following shortcode parameters:
channel – Channel handle without the @ symbol (e.g., “yourchannelname”)
max – Number of Shorts to display (1-50)
columns – Number of columns on desktop (2-6)
cache – Cache duration in seconds (minimum 300)
Display Options
From the settings page, you can control these display elements:
Show/hide video title
Show/hide view count
Show/hide time ago
Show/hide duration overlay
Show/hide “Watch on YouTube” link
Show/hide channel header section
Show/hide channel avatar
Show/hide channel name and subtitle
Show/hide “Visit Channel” button
Colors and layout can also be customized to match your website’s design.
External Services
This plugin connects to the YouTube Data API v3 to retrieve video data from YouTube channels. This API connection is necessary to display YouTube Shorts on your WordPress site.
YouTube Data API v3
Service Purpose: The plugin uses YouTube Data API v3 to search for channels, retrieve video lists, and get detailed information about YouTube Shorts videos.
When API Calls Happen: API requests are made when:
A page containing the shortcode is loaded and the cached data has expired
Plugin settings are updated (to refresh the data)
Data Sent:
YouTube channel handles/IDs provided in the plugin settings or shortcode
API key (provided by you in the plugin settings)
Standard API request parameters as required by YouTube API
Data Retrieved:
Channel information (title, thumbnail URL)
Video details (title, duration, view count, publish date)
No personal user data is collected or transmitted
Terms of Service and Privacy:
Google APIs Terms of Service
Google Privacy Policy
The plugin caches all requests to minimize API usage and improve performance. The cache duration is configurable in the plugin settings.
Note: You will need to create your own Google API key with YouTube Data API v3 enabled to use this plugin. The plugin includes fallback data if no API key is provided, but live data from YouTube channels requires a valid API key.
