feed
toolsconditions
faq

Youtube Feeder WordPress Plugin


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


Description

Youtube Feeder allows you to embed a dynamic Youtube video feed anywhere in your WordPress blog. 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 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 a Youtube user's feed 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

Options Page

Simple "List" Style Example

"Playlist" Style Example

Back to top


Demo


The above demo was embedded in this post with:

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

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


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


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:

  • user - The Youtube user to grab the feed from
  • limit - The maximum number of videos to display
  • width - Video width
  • height - Video height
  • dateformat - The format in which to display the date. Any PHP date() compatible format
  • datelocation - Where to put the date. Valid values:
    • beforevideo
    • beforetitle
    • aftertitle
    • nowhere
  • description - Set to 'true' to display the video descriptions. Set to 'false' to disable
  • style - List style. Valid values:
    • list
    • playlist
  • thumbnail - Set to 'true' to display thumbnails in the 'playlist' style feed. Set to 'false' to disable
  • 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 user="flamadiddle86" limit="3" width="335" height="275" dateformat="n/d/y" datelocation="aftertitle" description="false" style="playlist" thumbnail="true" cache="3 days"]



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
<?php
if(function_exists('embed_youtube_feed'))
{
    embed_youtube_feed(array(
            'user' => 'flamadiddle86',
            'limit' => 3,
            'width' => 335,
            'height' => 275,
            'dateformat' => 'n/d/y',
            'datelocation' => 'aftertitle',
            'description' => 'false',
            'style' => 'playlist',
            'thumbnail' => 'true',
            '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 three of the same options with the [youtubefeeder] shortcode:

  • user - The Youtube user to grab the feed from
  • dateformat - The format in which to display the date. Any PHP date() compatible format
  • 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 user="flamadiddle86" 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
<?php
if(function_exists('get_youtube_published_date'))
{
    get_youtube_published_date(array(
            'user' => 'flamadiddle86',
            '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 two of the same options with the [youtubefeeder] shortcode:

  • user - The Youtube user to grab the feed from
  • 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 user="flamadiddle86" 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
<?php
if(function_exists('embed_youtube_thumb'))
{
    embed_youtube_thumb(array(
            'user' => 'flamadiddle86',
            'cache' => '3 days'
        ));
}
?>

Back to top


Version

The current version of this plugin is 1.0.7

Back to top


Changelog

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

  • 1.1

    • Switch embed code to (now standard) iframe embeds with option to fall back to old embed code.
    • Add all available video playback settings, such as showing related videos, HD playback, autoplay, style options, etc.
    • Add ability to hide video title in simple list format.
  • 1.2

    • 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
  • 2.0

    • Add ability to embed user playlists.
    • Add ability to embed global playlists.

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:


…or maybe even buy me something from my wishlist:
My Amazon Wishlist

Back to top

careers
  • Camille

    The plugin has been working fine until today. It won't load my newest video no matter what I do. I've deactivated/activated, removed my username/saved/reentered my username, etc. There's no music in my video to block it. Any thoughts?

  • Darlene

    Hi,

    Love this plugin - thanks! I see that you should be able to specify a playlist for a user in the latest release. How does one do that? I have the username specified, but am unclear as to where I specify the exact playlist for the user to be shown.

    Would that be in the shortcode?

    Thanks!

    • Anonymous

      I have the same question. Below comments say that I should be able to do this and for the life of me can't figure it out.

      • http://andrewensley.com/ Andrew

        There is no way to embed a specific playlist at this time.  It is a planned feature for a future release.  Sorry for any misunderstanding.

        • http://twitter.com/BrashersAA Brasher’s Auctions

          Count us in with another request to embed a specific playlist. Thanks for the great tool!

    • http://andrewensley.com/ Andrew

      There is no way to embed a specific playlist at this time.  It is a planned feature for a future release.

  • Shelly Lee Edwards

    I love the plug in... as a newbie WP person it was very easy to install... Thanks. 

    You may have already answered this... but I couldn't find it in your other comments.

    Is there a way to get rid of the related videos at the end of the video? Also, can I take one of the 'titles' of the video away?.. We get the title on the video and below the video at the same time.
    Michelle

    • http://andrewensley.com/ Andrew

      I've added a feature to the Roadmap for 1.1.

  • Archtype13

    is there a way to activate autoplay mode

    • http://andrewensley.com/ Andrew

      I've added a feature to the Roadmap for 1.1.

  • Archtype13

    is there a way to display a specific playlist

    • http://andrewensley.com/ Andrew

      I've added a feature to the Roadmap for 2.0.

  • Greg

    Awesome, awesome plugin!

    I've added this great plugin to a text widget to get it into a sidebar, using this code:
    View all
    [youtubefeeder user="uwmnews" limit="1" style="playlist" width="275" height="220" dateformat="n/d/y" thumbnail="false"]

    As you can see below, the description doesn't fill the sidebar.

    Can anyone tell me why?

    • http://andrewensley.com/ Andrew

      The width of that text is controlled by CSS rules set in the plugin's stylesheet.  Look for the sections starting with:

      .youtubeFeederPlaylistList

      on line 68 of http://uwmnews.chojnacki.us/wp-content/plugins/youtube-feeder/css/style.css

      and:

      .youtubeFeederPlaylistList li

      on line 75 of http://uwmnews.chojnacki.us/wp-content/plugins/youtube-feeder/css/style.css

      You'll see a rule for width that is currently set to 220px and 216px in each respective section.  You'll probably want to change both to 100%

    • Greg

      Me again: The issue was using the "playlist" style, rather than the "list" style.

      Fixed that, changed the fonty size ... lookin' sweet!

      Time to donate...

      • http://andrewensley.com/ Andrew

        Donation received.  Thank you!

  • http://pulse.yahoo.com/_G7UCCO5H2FDJGVJ5QPOGVTKHMU cory

    Hi Andrew,

    Great plugin! Thanks sooo much!

    Although, it won't post any videos less then 1 day old. I have tried to clear the cache and put a "o" without the quotes in the cache area....but it still won't load the most recent videos that have been posted a couple of hours ago. i keep trying and it won't post new vids. Any suggestions?

    Cory

    • jen

      can you please advice how to get videos to post that are under 1 day old. Even putting zero in the cache area will not pull up the most recent video. I would like to give you a donation if this can be fixed.

      • http://andrewensley.com/ Andrew

        Hi Jen, this question has come up a few times before, so I've added it to the FAQ section.

    • http://andrewensley.com/ Andrew

      Hi Cory, this question has come up a few times before, so I've added it to the FAQ section.  If you're videos still aren't showing up, see the first FAQ for a potential explanation.

  • Travis

    Love the plugin. Simple and perfect for its purpose. I'm attempting to use FitVids (http://fitvidsjs.com/) for responsive video with this plugin. Works great in browser but on iOS devices it seems the object embed doesn't play nice. Height doesn't scale properly. Any way to incorporate the standard iframe embed for Youtube?

    • Travis

      Actually, investigating a little further I don't think the iframe embed or the object embed is an issue. The height entered into the plugin settings that affects the .youtubeFeeder div is.

      • Travis

        Thinking maybe if this didn't need to be entered or could be included with percentages then it might fix this. Would be great to see this plugin work perfect with FitVids. It would be a great upgrade to the current plugin.

        • http://andrewensley.com/ Andrew

          I've added a feature to the Roadmap for 1.2 that should address this issue and make customizations like this much easier.

  • Mrman

    How do i remove the video title from below the embedded videos please? I just want to show the video and nothing else.

    • http://andrewensley.com/ Andrew

      I'll work on adding that feature in the next release.

  • Alex

    Thank you man for this plugin, really saved my day!!!!

    • http://andrewensley.com/ Andrew

      You're welcome! Glad to hear you liked it.

  • Anonymous

    Hello Andrew,

    I have a little problem...I sync my youtube channel to my website with your application, but there is some videos wich are not showed on my website.
    You can see the bug here : http://guimbi-production.com/videos/

    Do you know a solve ?

    Thanks

    • http://andrewensley.com/ Andrew

      Hi Julien,

      As mentioned here, it's probably 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.

      • Anonymous

        Thank you for your answer. On the other hand, I do not understand why I cannot post them on my site, in measurement or Youtube sent a notification to me, but these videos are not blocked as can the being certain videos; Moreover, I tested JwPlayer today by synchronizing my chain using a flashvars, and my videos appeared (http://gdata.youtube.com/feeds/api/users/guimbiproduction/uploads?v=2)! Is it possible to call the posting of my playlist using this variable? Thank you.

  • James

    Hi Andrew,

    Unfortunately the 'playlist' view isn't displaying the main video. The 'simple list' view works fine though. The playlist view is displaying the thumbnail list ok, just not the main video.

    Is there something I'm missing? The page is here: http://www.james-marshall.com/nspcc/

    Many thanks

  • Blob

    would really like to see NOT just username but also categories and/or keywords in that category. Now that would be really special

    • http://andrewensley.com/ Andrew

      Thanks for the suggestion.  As you can see above, that is a planned feature for Version 2.0.

  • Paul

    Hello, Im sorry if you answered this already, but i was wondering if the youtube play list can be displayed into 2 columns (instead of 1)? im not good at CSS

  • jenny

    I love your plugin. But all of a sudden today, i have two websites that are just "hanging" and taking forever to load the page. I don't understand b/c it worked great over the past month. I tried removing the youtubefeeder script and my site loaded fast. As soon as i then tried to add the youtubefeeder script it loaded really slow again. Any idea why this is happening?

    • http://andrewensley.com/ Andrew

      What is your cache set to?

      • jenny

        I tried moving the cache to 5 hours vs. 0. And it still is hanging there and not allowing the page to load. Should i try uninstalling the plugin and reinstalling? Should i try moving my site to a new server?

        • http://andrewensley.com/ Andrew

          The delay you're seeing is due to the time it takes for the server to retrieve the video feed from Youtube. If you're cache is set to 0, that means the server will connect to youtube on every page view before displaying the results. Does your page still hang on every page view or just the one immediately after changing the cache settings?

          • jenny

            Hi Andrew,
            I changed the cache to 5 hours about 8 hours ago. When i checked my website a second ago, it was still hanging. I wonder if the cache is somehow not  changing. Maybe i should reinstall the plugin?

          • http://andrewensley.com/ Andrew

            Can you give me a link to the page that's hanging and the settings you're using to embed (user, style, limit, etc.)?  If you don't want to post them here, you can use my Contact form to email me.

          • jenny

            Hi andrew,
            Here is one of the URLs that i have your plugin on..the script i added was:

            [youtubefeeder user="whygoldandsilver" limit="2" width="335" height="275" dateformat="n/d/y" datelocation="aftertitle" description="false" style="list" thumbnail="true" cache="9 hours"]

            Here is the page:
            http://howmuchissilverworth.org/mike-maloney-videos/

            should i try moving to a different server? and reinstall?
            P.S. - sometimes it hands, and sometimes it  doesn't ..so confused.

            Thanks so much for your help.
            Jenny

          • jenny

            my site isn't "hanging" today. I hope it stays like this. I don't know why some days it hangs and other don't. ??

  • Vince

    Is there anyway to recode this to pull specific dates from you-tube?

  • http://twitter.com/thedrumosphere David Moss

    000

  • http://twitter.com/thedrumosphere David Moss

    Is there a way

  • http://twitter.com/BossSinSeer Dalibor Zujovic

    Is there a way to add wmode="transparent" to allow DHTML menus to sit on top of the videos?

  • Hendel

    Hey Andrew, excellent work! I installed the plugin on wordpress website, and it works fine with all usernames I try besides my own. I tried yours, and random ones I stumbled upon. When I enter my own (only 1 video avail at the moment), it says: "Did you supply the correct user?"

    Any suggestions?
    Thanks!

  • Anonymous

    Hi

    Many thanks for the wordpress plugin. Is it possible to specify that youtube use html5 instead of flash?

    Thanks

api