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:

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.

スクリーンショット

  • Admin Panel Setting page screenshot-1.jpg

インストール

  1. Upload the plugin files to the /wp-content/plugins/display-dynamic-shorts-for-youtube-with-shortcode directory, or install the plugin through the WordPress plugins screen.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Navigate to Settings > YouTube Shorts to configure the plugin.
  4. Enter your YouTube API Key and channel handle.
  5. Customize display options according to your preference.
  6. Use the shortcode [dyshorts] in your posts or pages to display the Shorts.

FAQ

How do I get a YouTube API Key?

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the YouTube Data API v3
  4. Create credentials and get your API key
  5. Add the API key to the plugin settings

Why do I need a YouTube API Key?

The YouTube API Key is required to fetch data from YouTube, including the channel information and video details. Without an API key, the plugin will use fallback data.

How many Shorts can I display?

You can display up to 50 Shorts from a channel, but for optimal performance, we recommend limiting to 10-15 Shorts per page.

Will this plugin slow down my website?

No, the plugin includes a robust caching system that minimizes API calls to YouTube. You can adjust the cache duration in the settings.

Can I customize the appearance of the Shorts display?

Yes, you can adjust the number of columns, background colors, and choose which elements to display (titles, view counts, etc.) through the plugin settings.

Can I display Shorts from multiple channels?

Yes, you can use multiple shortcodes with different channel parameters to display Shorts from different channels on the same page.

How do I change the mobile display?

The plugin automatically switches to a slider layout on mobile devices for optimal viewing experience.

評価

このプラグインにはレビューがありません。

貢献者と開発者

Display Dynamic Shorts for YouTube With Shortcode はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Display Dynamic Shorts for YouTube With Shortcode” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

1.0.0

  • Initial release of YouTube Shorts Display plugin
  • Core functionality for displaying YouTube Shorts
  • Responsive design and customization options
  • Caching system for optimal performance
  • Mobile-optimized slider view
  • Easy shortcode implementation