DK YouTube Viewer displays a channel's uploads with a featured YouTube player and a grid of video thumbnails. It requires WordPress 6.0 or later, PHP 8.0 or later, and an installed and activated DK Base Plugin.
UC), rather than a channel URL, handle, or playlist ID.[dk_youtube_featured_playlist] to a WordPress Shortcode block on the page where you want the viewer, then view that page.channel_id. You may leave this blank if every shortcode supplies its own channel ID.999. This setting and the max shortcode attribute limit the videos displayed (minimum 1). The cached channel playlist remains shared, so one viewer’s limit does not truncate another viewer. Retrieval stops when the uploads playlist ends or the pagination safety limit is reached.10. Controls how many thumbnails are revealed at a time. Use a whole number of at least 1.Use your saved channel and batch settings:
[dk_youtube_featured_playlist]
Show another channel without changing the default. Replace the example ID with the actual channel ID:
[dk_youtube_featured_playlist channel_id="UC_REPLACE_WITH_YOUR_CHANNEL_ID"]
Reveal six thumbnails at a time for this viewer:
[dk_youtube_featured_playlist channel_id="UC_REPLACE_WITH_YOUR_CHANNEL_ID" batch="6"]
The supported attributes are channel_id, batch, and max. Omitted attributes use the saved settings. The API key is configured in settings; it is not a shortcode attribute. The viewer uses the channel's uploads playlist; there is no setting for selecting a separate YouTube playlist.
The first video returned from the channel's uploads playlist appears in the featured player. Click a thumbnail to switch the player to that video; the page scrolls back to the player. The selected thumbnail stays in color and displays a red indicator. Other thumbnails change from grayscale to color on hover.
More thumbnails appear in batches as you scroll near the bottom of the viewer. This reveals videos already retrieved with the page; it does not request another set of videos from YouTube. The player and thumbnail grid adjust to the available screen width.
The plugin caches a nonempty uploads list separately for each channel. The cache expiration is calculated as the next Tuesday at 12:05 p.m. in the America/Denver time zone, with a minimum lifetime of five minutes. After the cache expires, the next page request retrieves the uploads again; there is no background refresh job.
New uploads may therefore take time to appear. Saving settings does not clear an existing channel cache. If your site also caches whole pages, those pages may need to refresh before visitors see the updated list. Empty results are not cached by the plugin.
channel_id in the shortcode.