and like us on FB

The code on this page is to support the article here titled “Add Thumbnail Image (Links) from a YouTube RSS Feed to WordPress with Shortcode”. That article should be referenced for information on the available argument array and formatting options.

The function requires three additional supporting functions:

  • For truncating a title to a number of words, use beliefmedia_truncate_words() from this page (the function has the title “Truncate to a Word Count”).
  • To return an appropriate image, the second beliefmedia_youtube_thumbnail() function is required from this page, titled “Get YouTube Thumbnail With PHP”.
  • The beliefmedia_youtube_thumbnail_size() function as provided on our shortcode article is required.
  • Simple Cache is required to cache the returned result. Get it here.

PHP Code

Usage is as follows:

Download

Download the shortcode version here.

Title: Add Thumbnail Image Links from a YouTube RSS Feed
Description: Add Thumbnail Image Links from a YouTube RSS Feed With WordPress Shortcode or PHP.
Download: PHP Code (V0.2) | Plugin Page

Shortt URL for this post: http://shor.tt/1TM6