Youtube Feeder Logo

YouTube Feeder WordPress Plugin


Description | Features | Screenshots | Demo | In The Wild | Requirements | Download
License | Installation Instructions | Usage | Version | Changelog | Roadmap | FAQ | Support


Description

YouTube Feeder allows you to embed a dynamic YouTube video feed anywhere in your WordPress-powered website. The feed is always up to date because it pulls directly from YouTube's data api, but it can also cache the YouTube feed based on configurable settings.

The feed can be:

  • User Uploads
  • User Favorites
  • User Subscriptions
  • User Playlist
  • Standard Feed
  • Category / Tag
  • Search

The plugin is very flexible because every aspect is configurable.  Each video feed can be configured separately, or you can use defaults that take effect site-wide.  Each component is given highly accessible classes for complete customization of the display through CSS.

The "Playlist" style of display was made possible by a jQuery plugin by Dan Drayne. The code is used with permission.

Back to top


Features

  • Retrieves and embeds the newest videos from YouTube video feeds automatically. No more updating pages or fiddling with embed code.
  • Displays player, title, date, and description for every video.
  • Configurable video size.  Can be set site-wide or per video feed.
  • Display styles completely customizable with simple tweaks to included CSS file.
  • Completely configurable date format.
  • Configurable caching of feeds to reduce server load and load time for visitors.  Can be handled site-wide or per video feed.
  • Can simply list each video or create a player, allowing visitors to click on each video title, loading it dynamically into the single player.
  • Configurable number of videos displayed in each feed.
  • Dedicated function to get the published date of the most recent video in a feed.
  • Dedicated function to get the thumbnail of the most recent video in a feed.

Back to top


Screenshots

"Minimal" Style Example

"Playlist" Style Example

Simple "List" Style Example

Options Page

Widgets Example

Main Widget Options

Thumbnail Widget Options

Published Date Widget Options

Back to top


Demo

Unable to get Youtube feed. Did you supply the correct feed information?

The above demo was embedded in this post with:

1
[[youtubefeeder feedtype="uploads" feedid="flamadiddle86" limit="2" style="playlist" width="335" height="275" dateformat="n/d/y"]]

Back to top


In The Wild

Examples of YouTube Feeder in use across the Internet:

If you would like to see your site listed here, let me know in the comments or send me a quick email.

Back to top


Requirements

The following are the minimum requirements for YouTube Feeder to work properly:

Back to top


Download

Download the latest version from the WordPress plugin page

Back to top


License

This plugin is released under the GPLv3 license and comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. I make no guarantee this plugin will work for you.

Back to top


Installation Instructions

  1. Unzip the files from the download file
  2. Upload the entire `youtube-feeder` folder to your `/wp-content/plugins/` directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Go to the YouTube Feeder options page and choose your settings
  5. Put the shortcode [youtubefeeder] in any post or page
    or <?php embed_youtube_feed(); ?> anywhere in your template files.

Back to top


Usage

There are three main functions of YouTube Feeder: embedding the YouTube feed, grabbing the published date of the most recent video in a feed, and embedding the thumbnail of the most recent video in a feed.

The list

To embed the feed, simply use the shortcode in any post or page:

1
[[youtubefeeder]]

The shortcode has several options:
Feed Options

  • user -
    Deprecated

    Use feedid and feedtype='uploads' instead.

  • feedtype - uploads, favorites, subscriptions, playlist, standard, category, or search
    The type of video feed
  • feedid
    The Feed ID. Value dependent on the feedtype.In the case of uploads, favorites, or subscriptions, this is the YouTube Username.For playlist feeds, this is the playlist ID.For standard feeds, this is the standard feed ID.For category feeds, this is the category or tag.For search feeds, this is the search terms.
  • orderby - relevance, published, viewCount, commentCount, position, duration, title, or rating
    The order for videos in the feed.

Display Options

  • style - minimal, playlist, or list
    The list style. Examples of each are in the screenshots.
  • limit
    The maximum number of videos to display
  • width
    Video width
  • height
    Video height
  • thumbnail - 0 or 1
    Set to 1 to display thumbnails in the playlist style feed. Set to 0 to disable.
  • title - 0 or 1
    Set to 1 to display the video title. Set to 0 to disable.
  • description - 0 or 1
    Set to 1 to display the video descriptions. Set to 0 to disable.
  • datelocation - beforevideo, beforetitle, aftertitle, or nowhere
    Where to put the date.
  • dateformat - Any PHP date() compatible format.
    The format in which to display the date.

Playback Options

  • autoplay - 0 or 1
    Set to 1 to autoplay videos. Set to 0 to disable.
  • loop - 0 or 1
    Set to 1 to loop playback of videos. Set to 0 to disable.
  • rel - 0 or 1
    Set to 1 to show related videos at the end of playback. Set to 0 to disable.
  • showinfo - 0 or 1
    Set to 1 to show video information in the player. Set to 0 to disable.
  • controls - 0 or 1
    Set to 1 to show playback controls. Set to 0 to disable.
  • disablekb - 0 or 1
    Set to 1 to disable keyboard controls. Set to 0 to enable.
  • fs - 0 or 1
    Set to 1 to show the fullscreen button in the player. Set to 0 to disable.
  • theme - dark or light
    Control bar theme.
  • autohide - 0, 1, or 2
    Set to 2 to autohide the progress bar only.
    Set to 1 to autohide the progress bar and controls.
    Set to 0 to always show the progress bar and controls.
  • color - red or white
    Progress Bar Color.
  • cc_load_policy - 0 or 1
    Closed Caption Policy. Set to 0 for visitor preference or 1 to force closed captions to display.
  • iv_load_policy - 1 or 3
    Video Annotation Policy. Set to 1 to display or 3 to disable.
  • modestbranding - 0 or 1
    Set to 1 to hide the YouTube Logo. Set to 0 to show.

Cache

  • cache
    Time period to cache feed data for. Any value like '1 day', '6 hours', '2 weeks', etc. will work.

They can be used as such:

1
[[youtubefeeder feedtype="uploads" feedid="flamadiddle86" orderby="published" limit="3" width="335" height="275" dateformat="n/d/y" datelocation="aftertitle" description="0" style="playlist" thumbnail="1" title="1" autoplay="0" loop="0" rel="0" showinfo="0" controls="1" disablekb="0" fs="1" theme="dark" autohide="2" color="red" cc_load_policy="0" iv_load_policy="1" modestbranding="1" cache="3 days"]]

Yes. That is a lot of options.

You can also call the function embed_youtube_feed() anywhere in your template files like so:

1
2
3
4
5
6
<?php
if(function_exists('embed_youtube_feed'))
{
    embed_youtube_feed();
}
?>

It takes all the same options as the shortcode, so you can specify specific settings like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
if(function_exists('embed_youtube_feed'))
{
    embed_youtube_feed(array(
            'feedtype' => 'uploads',
            'feedid' => 'flamadiddle86',
            'orderby' => 'published',
            'limit' => 3,
            'width' => 335,
            'height' => 275,
            'dateformat' => 'n/d/y',
            'datelocation' => 'aftertitle',
            'description' => '0',
            'style' => 'playlist',
            'thumbnail' => '1',
            'title' => '1',
            'autoplay' => '0',
            'loop' => '0',
            'rel' => '0',
            'showinfo' => '0',
            'controls' => '1',
            'disablekb' => '0',
            'fs' => '1',
            'theme' => 'dark',
            'autohide' => '2',
            'color' => 'red',
            'cc_load_policy' => '0',
            'iv_load_policy' => '1',
            'modestbranding' => '1',
            'cache' => '3 days'
        ));
}
?>

The date

To embed the published date of the most recent video in a feed, just use this shortcode:

1
[[youtubefeederpublisheddate]]

This shortcode shares five of the same options with the [youtubefeeder] shortcode:
Feed Options

  • user -
    Deprecated

    Use feedid and feedtype='uploads' instead.

  • feedtype - uploads, favorites, subscriptions, playlist, standard, category, or search
    The type of video feed
  • feedid
    The Feed ID. Value dependent on the feedtype.In the case of uploads, favorites, or subscriptions, this is the YouTube Username.For playlist feeds, this is the playlist ID.For standard feeds, this is the standard feed ID.For category feeds, this is the category or tag.For search feeds, this is the search terms.
  • orderby - relevance, published, viewCount, commentCount, position, duration, title, or rating
    The order for videos in the feed.

Display Options

  • dateformat - Any PHP date() compatible format.
    The format in which to display the date.

Cache

  • cache
    Time period to cache feed data for. Any value like '1 day', '6 hours', '2 weeks', etc. will work.

They can be used like this:

1
[[youtubefeederpublisheddate feedtype="uploads" feedid="flamadiddle86" orderby="published" dateformat="n/d/y" cache="3 days"]]

You can also call the function get_youtube_published_date() anywhere in your template files like so:

1
2
3
4
5
6
<?php
if(function_exists('get_youtube_published_date'))
{
    get_youtube_published_date();
}
?>

It takes all the same options as the shortcode, so you can specify specific settings like this:

1
2
3
4
5
6
7
8
9
10
11
12
<?php
if(function_exists('get_youtube_published_date'))
{
    get_youtube_published_date(array(
            'feedtype' => 'uploads',
            'feedid' => 'flamadiddle86',
            'orderby' => 'published',
            'dateformat' => 'n/d/y',
            'cache' => '3 days'
        ));
}
?>

The Thumbnail

To embed the thumbnail of the most recent video in a feed, just use this shortcode:

1
[[youtubefeederthumbnail]]

This shortcode shares six of the same options with the [youtubefeeder] shortcode:
Feed Options

  • user -
    Deprecated

    Use feedid and feedtype='uploads' instead.

  • feedtype - uploads, favorites, subscriptions, playlist, standard, category, or search
    The type of video feed
  • feedid
    The Feed ID. Value dependent on the feedtype.In the case of uploads, favorites, or subscriptions, this is the YouTube Username.For playlist feeds, this is the playlist ID.For standard feeds, this is the standard feed ID.For category feeds, this is the category or tag.For search feeds, this is the search terms.
  • orderby - relevance, published, viewCount, commentCount, position, duration, title, or rating
    The order for videos in the feed.

Display Options

  • width
    Thumbnail width
  • height
    Thumbnail height

Cache

  • cache
    Time period to cache feed data for. Any value like '1 day', '6 hours', '2 weeks', etc. will work.

They can be used like this:

1
[[youtubefeederthumbnail feedtype="uploads" feedid="flamadiddle86" orderby="published" width="335" height="275" cache="3 days"]]

You can also call the function embed_youtube_thumb() anywhere in your template files like so:

1
2
3
4
5
6
<?php
if(function_exists('embed_youtube_thumb'))
{
    embed_youtube_thumb();
}
?>

It takes all the same options as the shortcode, so you can specify specific settings like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
if(function_exists('embed_youtube_thumb'))
{
    embed_youtube_thumb(array(
            'feedtype' => 'uploads',
            'feedid' => 'flamadiddle86',
            'orderby' => 'published',
            'width' => 335,
            'height' => 275,
            'cache' => '3 days'
        ));
}
?>

Back to top


Version

The current version of this plugin is 2.0.1

Back to top


Changelog

2012-07-25 - 2.0.1:

  • Changed urls for embeded videos and thumbnails to be protocol agnostic, ensuring compatibility with secure sites.

2012-07-20 - 2.0.0:

  • Added ability to embed user playlists.
  • Added ability to embed global playlists.
  • Added 'minimal' style (playlist embedded in a single player).
  • Switched embed code to iframe embeds.
  • Added all available video playback settings, such as showing related videos, autoplay, style options, etc.
  • Added ability to hide video title in simple list format.
  • Added Widgets.

2011-08-17 - 1.0.7:

  • Updated to grab video description from new location in YouTube's data feed.

2011-06-06 - 1.0.6:

  • Fixed bug causing manual function calls to always use the default admin settings.

2011-03-25 - 1.0.5:

  • Fixed order of video feed so that it is now in reverse-chronological order.

2011-03-24 - 1.0.4:

  • Fixed the "Invalid argument supplied for foreach() on line 103" bug.
  • Fixed the API call to only grab videos that are embeddable on public websites.
  • Expanded number of possible results up to 50 instead of the default 25. The YouTube API does not honor requests for more than 50.
  • Added cURL as alternative to file_get_contents() for grabbing the feed.

2010-09-13 - 1.0.3:

  • Added the ability to embed the most recent thumbnail from a feed.
  • Added the ability to display the video description in "playlist" style and remove it in simple "list" style.
  • Changed the default embed style to "playlist".
  • Changed preview to show default YouTube user (if available) instead of a static user.
  • Fixed bug in get_youtube_published_date() function.
  • Changed some of the default CSS classes.
  • Changed URL for thumbnails.

2010-09-10 - 1.0.2:

  • Added ability to view videos fullscreen.
  • Fixed a bug with updating cache settings.

2010-09-09 - 1.0.1:

  • Fixed bug with embed_youtube_feed() and get_youtube_published_date() raising warnings when no argument was supplied.
  • Added ability to add thumbnails to "playlist" style.
  • Added ability to clear the YouTube Feeder Cache.
  • Added message pointing to this page for FAQ and Support to the top of the settings page.
  • Changed name of main plugin file from 'youtube_feed.php' to 'youtube-feeder.php' for consistency.

2010-09-09 - 1.0.0:

  • Initial release

Back to top


Roadmap

  • 3.0

    • Add switchable theme support for the different list styles via separate CSS files.
    • Also add new theme-file detection to allow for custom user themes that will not be over-written on updates

Back to top


Frequently Asked Questions

  • Q: Why don't all videos show up?

    A: YouTube restricts some videos from being embedded on public websites. This can be for copyright reasons or settings configured by the uploader. As a result, this plugin will not be able to embed those videos.

    If you are the uploader, and you didn't restrict public embedding on the video yourself, it's most likely because music in the video is copyrighted or it contains clips of a copyrighted video. You can review YouTube's fair use policies and submit a counter-notification if you feel your video falls within fair use.

  • Q: Why can't I display more than 50 videos?

    A: The YouTube API enforces a limit of 50 results for users' upload feeds. Unless and until YouTube changes the limit, this plugin will be unable to display more than 50 videos at a time.

  • Q: Why is it taking so long for my new videos to show up?

    A: First, try clicking the Clear Cache Now button on YouTube Feeder's settings page to make sure you are getting the most up-to-date information available. If that doesn't work, it is most likely a delay in the YouTube API.

    YouTube's API is updated periodically throughout the day. As a result, uploaded videos won't be visible in the feed immediately. The YouTube API reference explains the delay. Here are some key points:

    • Uploaded videos will be included in a user's public uploaded videos feed a few minutes after the upload completes and YouTube finishes processing the video.
    • Uploaded videos will usually be available in search feeds within 30 minutes to two hours after the upload completes and YouTube finishes processing the video. However, this delay may be longer under heavy API server loads.

    To make sure your video shows up as soon as possible, upload it as public initially. Until the video is included in the YouTube API, this plugin will not be able to display it.

  • Q: When will Feature "X" or Release "Y" be ready?

    A: I write and maintain this plugin in my free time. I've given it to the WordPress community for free because I want to give back to such a great open source project and hopefully help others along the way. I don't have any deadlines or release dates for this project because it takes a backseat to my full-time job.

    If you're waiting for a specific feature, you can hope I get some free time soon or consider making a donation (using the link under Support). If I receive a donation for a specific feature, I will prioritize that first and get it out as soon as possible.

Back to top


Support

Please post any problems, comments, or suggestions on this page or contact me if you have an urgent problem.

If this plugin is useful to you, please consider donating to support further development:

Back to top

rss