WordPress YouTube Widget

Number 7 in Widget-A-Day is a YouTube widget.

It'll display a YouTube video in the sidebar. Just enter the URL of the video, and it'll show in the sidebar. You can change the width and height, and make it autoplay or not.

Download youtube.zip

SVN Checkout
svn co http://svn.wp-plugins.org/youtube-widget/trunk

Default display:
youtbe1cropped.png

Admin panel:
youtube2cropped.png

Requirements

Installation

  1. Download youtube.zip
  2. Extract and upload youtube.php to the plugins/ directory
  3. Enable YouTube Widget in the Plugin admin panel
  4. In widget admin panel, place YouTube in the sidebar, and edit it to enter the YouTube URL, not the embed code

Download youtube.zip

73 Comments

  1. j says:

    Is there a way to use multiple instances of this? Or is there another plugin with that functionality?

    This question was asked above but I wasn't clear on the answer. thanks for this.

  2. haber says:

    The removing of the YouTube URL is quite dumb. It should be a reg-ex, but I got lazy. If anything is slightly different with the URL, even case wise, it won’t work right.

  3. hellows says:

    thanks. this is a nice plugin. do you know if you will be adding any extras. will the plugin be developed. a future which would automatically update you tube videos would be useful. thanks

  4. [...] YouTube Widget: Allows your users to show their latest YouTube videos on their sidebar. Great for all that travel footage! [...]

  5. Blake Tallos says:

    wow, dude.Thanks for the great plugin.:DD

  6. A Peterson says:

    Does your widget work on WordPress 2.7?

  7. sam says:

    No, Man its not working

  8. Mark says:

    HI, thanks for the plugin, I have a problem with it as it show me this error:

    Warning: array_slice() expects parameter 1 to be array, null given

    were all the errors in the php have this:

    $items = array_slice($feed->items, 0, $maxitems);
    foreach ($items as $item)

    any help?

    Running WP 2.6.5

  9. James Wilson says:

    @Mark, what? array_slice and $feed are never used in this plugin.

  10. Mark says:

    James, My apologies, wrong plugin…glad to find out!

  11. LimiGuy says:

    I saw this question before but didn't see an answer. Is there any way to get this widget to go up on a sidebar more than once?

    Great widget!

  12. It seems your plugin has just stopped working on every site I had it on. Once example, http://www.vmsphotography.com when you goto the pages, there is suppose to be a youtube video that is in the top left corner.

  13. nish says:

    I would like to use this plugin as want display only on certain pages? some sort of if{condition} any help or guide pls?

    Thanks

  14. Billy Brasov says:

    Thanx for this useful plugin!

  15. monica says:

    It gives me the following error:

    Fatal error: Call to undefined function: str_ireplace() in /var/www/vhost/mas-memory.com/home/html/somos/wp-content/plugins/youtube.php on line 111

    How can I fix this?

    Thanks

  16. Ben says:

    I know this isn't a great fix, but for multiple instances of this plugin, I just copied the plugin file, went through the whole code and replaced every "youtube" into "youtube2" in all the code and everything. I then uploaded the copy in to the plugins folder and activated my new "Youtube2" plugin. Not a great fix, but I only needed two instances of it anyway.

  17. Ben says:

    Nish: try Widget Logic for your condition request. It'll add a widget logic field on the bottom of all plugins. You just need to know the page/post id # and then type in 'is_page(id_number_here)' without the quotes. You can find the plugin here: http://wordpress.org/extend/plugins/widget-logic/

  18. Ole says:

    Doesn't work.

  19. Vince says:

    Hi James,

    Just downloaded and uploaded this Plugin.
    It's activated in the PLugins section.
    Under the Widgets section it appears but it wont let me 'add' it to the sidebar as the 'Save' button disappears and therefore wont allow me to save or activate it.
    I've tried doing it a few times but cant get it to work.

    I have Wordpress version 2.7.1 on the site that I have currently installed this plugin.

    What should I try??

  20. barbara says:

    Hi James,
    I downloaded your You Tube plugin, but Í've got problems using it. I'm using the fusion theme. At the widgets page the YouTube widget is shown. If I click on 'add', the 'current widgets' disappear, and the "save chacges button" as well. Do you have any idea how to solve this problem?

    Thanx in advance, Barbara

  21. JDE says:

    Hi,

    Am trying to load your youtube widget to the site. Will it work with WP 2.7.1? If not, is there another youtube widget you could recommend.

    Thanks

  22. Fredrick says:

    Thanks for this great widget. I have it working on my website.

Leave a Reply