YouTube SimpleGallery

YouTube SimpleGallery on

YouTube SimpleGallery – new and improved!

  • YouTube SimpleGallery and Vimeo SimpleGallery have merged, i.e. they now have the same codebase. Old shortcodes still functional.
  • NEW FEATURE: It is now possible to combine video services, i.e. you can add links from YouTube and Vimeo in the same gallery.
  • NEW FEATURE: Automatically fetch titles from video service.
  • NEW FEATURE: User-defined attributes in shortcode overrides default settings: cols=x and thumbwidth=y allows for galleries with different thumb sizes, etc.
  • NEW SHORTCODE: [youtubeuserfeed user=username service=youtube] – outputs a gallery from a user’s video feed – works with both YouTube (service=youtube) and Vimeo (service=vimeo).


Make sure you go through the Options for the plugin, and set defaults to your preference.



You can now combine links from YouTube and Vimeo in the same gallery.

To embed a gallery in a Post use the following code:


If you want to add titles to the videos, add it before the link and separate with | (pipe), like this:

Avatar Trailer HD|
Eyes Close|
The Fast Show: Unlucky Alf|
Jožin z bažin|

NOTE: If titles are added before videos, these will override titles fetched automatically from services.

The result:

[youtubegallery thumbwidth=200 cols=3]
Avatar Trailer HD|
Eyes Close|
The Fast Show: Unlucky Alf|
Jožin z bažin|

Error Reporting

If error reporting is turned on under Settings > Video, and the video service reports the video as missing/broken, the gallery will display an error message:

[youtubegallery thumbwidth=200 cols=3]
Avatar Trailer HD|
Eyes Close|
The Fast Show: Unlucky Alf|
Jožin z bažin|

If error reporting is turned off, the video is simply skipped.

User Feeds

To set up a gallery that subscribes to a user’s feed, use the following shortcode:

[youtubeuserfeed user=username service=youtube]

Note that both user and service are required for the feed to work. Service is either youtube or vimeo.

Optional attributes are maxitems=x where x is the number of items to fetch:

[youtubeuserfeed user=username service=youtube maxitems=4]


Overrides are a way of suppressing the default settings of the plugin, with attributes of your own.

Override columns with cols=x, where x is the number of thumbs per row:

[youtubegallery cols=8]

Override thumbnail width with thumbwidht=x, where x is a pixel value:

[youtubegallery thumbwidth=100]

Fetch titles from service with autotitles=fetch (or autotitles=false to not fetch):

[youtubegallery autotitles=fetch]

And, of course, you can combine them:

[youtubegallery cols=8 thumbwidth=100 autotitles=false]

These are also applicable for the [youtubeuserfeed] shortcode.


Add a «YouTube SimpleGallery» widget to your sidebar(s), add links with linebreaks in the Links-area. You can add titles in the same way as for Posts.

Widgets have their own fields to define columns and thumbnail width.
You cannot use shortcodes in Widgets.

Supported Video Services

Supported services are YouTube and Vimeo. Other services might be added, but a requirement is that they can deliver video streams in a HTML5-compatible format.

Note that it is possible to combine videos from both services in galleries.

Support developtment

174 thoughts on “YouTube SimpleGallery

  1. Grady Jackson

    For some reason I cannot get my channel to play with user=realestatesantacruz but then it works fine on any other channel like my other one user=realcruzdotcom

    It is driving me crazy!

    Can anyone figure out what the deal is? Is it a YouTube issue?

      1. Thomas Perli

        I have the same problem for the user Girovagando in Trentino Channel.. The plugin shows two videos of another user.. please help!

  2. CUEvIS

    Is there a way to use a lightbox other than the ones that come with this plugin? (ie. responsive lightbox)

  3. Aza

    I am only able to use a maximum number of 8 videos in my gallery! If I put 9 videos, the whole gallery disappears from my site!?

    I tried changing settings like the number of columns, etc…

    Please help!
    Thank you! I love this plugin, by the way thank you for taking your time to create it!

  4. rolando


    After the update I get the following errors in all of the pages where I used the plugin.

    Warning: Division by zero in /home/comocont/public_html/wp-content/plugins/youtube-simplegallery/inc/shortcode.php on line 238

    And so on and so on with different “lines”.

    Anybody knows what can I do?

    Thanks in advance for a wonderful plugin.

    1. Joe

      Same thing’s happening to me. I’m trying to figure out how to return to previous version because I’m not finding a fix for the error.

      1. Joe

        Fixed my problem. In the Thumbnails section of the SimpleGallery settings, there is a part where you can set the number of columns. I had mine on 0 because that makes it so it shows as many thumbnails in one row as can fit on the screen. My website’s template changes size with different screens, so setting columns to 0 was the best setting for me. I tried changing that to 5 and the error went away (I did notice that the columns were still acting like they used to and weren’t ending after 5 thumbnails).

        Also the thumbnails weren’t showing up, so to fix that I checked the box at the bottom of the thumbnail settings page that says “Do not use Timthumb on thumbnails.”

  5. Mauro

    When you set the number of thumbnails to zero to get the free flow, the plugin displays the following error message, one per thumbnail:

    Warning: Division by zero in /home/liquidox/www/dermandlaser/wp-content/plugins/youtube-simplegallery/inc/shortcode.php on line 238

    Plus, it displays one thumb per line. Could you please fix that? Other than this problem, your plugin is fantastic.

  6. Chris

    Just upgraded to WP3.6 and the new version. Now I get:

    Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML’ in /home1/xxxxx/public_html/ Stack trace: #0 /home1/xxxxx/public_html/ SimpleXMLElement->__construct(‘Private video’) #1 /home1/xxxxx/public_html/ yotube_gallery_getYouTubeDataFromID() #2 /home1/xxxxx/public_html/ global_output_youtubegallery(‘8uRFD3wEEJc’) #3 /home1/xxxxx/public_html/ show_youtubegallery(”, Array) #4 /home1/xxxxx/public_html/ do_shortcode_tag(”, ‘?Donald S…’, ‘youtubegallery’) #5 /home1/xxxxx/public_html/ in /home1/xxxxx/public_html/ on line 64

    1. Nicole Smith


      I was experiencing the same problem. I deleted and re-added each video. The videos that produced the error turned out to be private on YouTube.

      I hope this helps.

    2. countyGuard

      Check if all your videos are available, i got the same error because the XML parser can’t handle a deleted youtube account. The YT account of one video was deleted, that caused the error.


  7. Adam

    Hi there. I am using your plugin but it only shows me two of the three videos on my channel. They are all public videos.

    Also, it I set columns to 0 (free) then I get an error code.

    Please help.

  8. Brian

    Hi there, great plugin – thanks!

    Is it not possible to link directly to a specific start time in the video, using the #t=2m10s parameter at the end of the url? I’ve got a long video that I’d like to be able to generate a page of thumbnails to multiple index points in the video, but the plugin seems to strip the time stamp out of the link.

    Apologies if you’ve covered this previously, I couldn’t see any similar questions.

    Thanks in advance,

  9. Rick Altman

    YouTube SimpleGallery sounds like the perfect plugin for me to display my Vimeo videos, but I can’t get out of the gate. I am using the utterly simple coding of:



    On this page: However, I am getting nothing. No thumbnails showing at all. I have tried disabling TimThumb but still nothing. I would love to get started with this plugin; can anyone offer assistance?

  10. Edward Owen

    Great concept, but when the code is plugged either into a post or on a page, it overrides the column feature on the Graphene theme.
    I’m using (in test mode) a three column layout, with Simple Gallery being placed in the left and widest column. When I go to a page (or post) with Simple Gallery on it, the gallery shows up fine and works, but the right hand columns are blank, and everything in them has been forced to the bottom of the page.
    I’ve turned off all other plug ins, and this makes no difference.
    I was trying to figure out how to isolate the plug in within that column (somehow by coding it), but I’ve got no where with that yet.
    Any thoughts would be appreciated!

  11. Bart Verkerk

    After update my wordpress to version 3.71
    I get the following error:
    exception thrown string could not be parsed as xml wordpress

    can u please solve this problem

    Thanks for your aford

  12. Inge

    Even though my YouTube channel contains many more than 25 videos, when I use
    [youtubeuserfeed user=TheRealLoveInstitute service=youtube]
    on my page, it only displays 25 videos. Even if I add the parameter maxitems=100, it only displays 25.
    Any help or explanation would be appreciated.

  13. Felix

    All of my vimeo links have mysteriously vanished! There were 7 vimeo and 1 youtube in the gallery, it was working fine until i tried to add one more vimeo link and then all the vimeo links are gone. Any help would be much appreciated. Its seems like a pretty important bug if it is one. Thanks

  14. Javier

    I want to add a tittle before the videos with the symbol | but when I use this symbol the thumbnail doesn´t appear.

  15. Stephanie

    Hello, I’m currently working on a website and I’m employed to do this all day. I just can’t find why vimeo videos won’t work, even though I tried everything. It seems to bug and for no apparent reason. Some help would be welcome because my boss will want those vimeo videos to be posted.

    They don’t appear at all, to be honest.

  16. John

    im getting this error on my site in reference to the gallery. I had to disable the plugin in order for the site to work. Can anyone let me know what is happening?

    Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML’ in /home/gridftp/public_html/wp-content/plugins/youtube-simplegallery/youtube_simplegallery.php:64 Stack trace: #0 /home/gridftp/public_html/wp-content/plugins/youtube-simplegallery/youtube_simplegallery.php(64): SimpleXMLElement->__construct(”) #1 /home/gridftp/public_html/wp-content/plugins/youtube-simplegallery/inc/shortcode.php(150): yotube_gallery_getYouTubeDataFromID(‘dj4HNVC4J8Y’) #2 /home/gridftp/public_html/wp-content/plugins/youtube-simplegallery/inc/shortcode.php(27): global_output_youtubegallery(”, Array) #3 [internal function]: show_youtubegallery(”, ‘ ?http:/…’, ‘youtubegallery’) #4 /home/gridftp/public_html/wp-includes/shortcodes.php(236): call_user_func(‘show_youtubegal…’, ”, ‘ ?http:/…’, ‘youtubegallery’) #5 [internal function]: do_shortcode_tag(Array) #6 /home/gridftp/public_html/wp-includes/shortcodes.php(151): preg_replace_callback(‘/\[(\[?)(embed|…’, ‘do_shortcode_ta…’, ‘[youtubegal in /home/gridftp/public_html/wp-content/plugins/youtube-simplegallery/youtube_simplegallery.php on line 64

  17. John

    Hi – I really appreciate the plug-in that you have taken time to develop. It really suits my needs, but I have had a problem after upgrading WP. Now, when the You Tube Simple Galley is activated, I get an error page:

    Exception thrown
    String could not be parsed as XML

    The code I use is:

    One Direction|
    Glee Cast|

    and I have marked FancyBox as the player.

    Other pages show up just fine. Any thoughts?
    Best Regards,

  18. Rick Altman

    Usiing the new YouTube SimpleGallery, I have found that none of my Vimeo videos appear. All of my YouTube videos show up, none of my Vimeo ones do. Any idea what might be causing that?

    Rick A.
    Pleasanton CA

  19. Rosi

    our post becomes unable to be read in case people who upload a video to youtube change video privacy from public to private. There is only a title, category, tags and date followed by warnings made by youtube gallery plugin (example taken from one post):

    Warning: SimpleXMLElement::__construct() [simplexmlelement.–construct]: Entity: line 1: parser error : Start tag expected, ‘<' not found in /data/web/virtuals/12667/virtual/www/wp-content/plugins/youtube-simplegallery/youtube_simplegallery.php on line 64

    Warning: SimpleXMLElement::__construct() [simplexmlelement.–construct]: Private video in /data/web/virtuals/12667/virtual/www/wp-content/plugins/youtube-simplegallery/youtube_simplegallery.php on line 64

    Warning: SimpleXMLElement::__construct() [simplexmlelement.–construct]: ^ in /data/web/virtuals/12667/virtual/www/wp-content/plugins/youtube-simplegallery/youtube_simplegallery.php on line 64

    The reason is that the video privacy is changed later but we cannot check every post manually if it is working or not. The only way how to get rid of the warning is to delete the private video from the youtube gallery in the shortcode. Then the post content would appear.

    Could you please help me resolve this?

    Thank you very much.

    Example of the post with warning:

  20. None

    Your donate button link is broken or something. This is the message from Paypal.

    Error Message

    PayPal cannot process this transaction because of a problem with the seller’s website. Please contact the seller directly to resolve this problem.
    PayPal cannot process this transaction because of a problem with the seller’s website. Please contact the seller directly to resolve this problem.

  21. Dean Griffiths


    Loving the plugin and would like to ask if there are possibilities to make the following adjustments on this plugin and even make it a paid version as tried all the other plugins and this one by far is the best and easiest to use.

    I would like to have the videos in order of them being put on YouTube as currently they are scattered.

    I would like to be able to add more than 25 which seems to be the max!

    I would like the plugin to be responsive so that the number of thumbnails on each line is dependent on device being watched on.

    Thank you and continue doing the great work your doing.

  22. Jason Davis

    I LOVE LOVE LOVE your plugin. I am using it in conjunction with Shadowbox JS.

    My only issue is that I am using the shortcode [youtubeuserfeed user=BRADPAISLEYVEVO service=youtube maxitems=99] but the maximum number of items displayed is 25 (though that user has more videos than 25).

    Any suggestions? Thanks, I appreciate it and will recommend to other WP designers!

  23. Pingback: Cómo construir una red social como las de NING pero sin gastar un céntimo El ojo crítico

  24. Diné

    So I’m using your plugin, and it’s working fine…but I’m having a problem with aligning the videos horizontally, or changing settings so that the videos reduce in size when the browser is reduced (rather than putting the videos underneath each other).
    1. How do I keep the format the same?
    2. How do I change the size of the video popup after I click on the thumbnail? I want to be able to watch the video, yet still be able to see my website in the background (rather than having to click ‘back’ in the web to get back to my website.
    Would really appreciate help!

  25. paul

    I have the same problem as Rick Altman, my Vimeo videos do not show, my YouTube video shows up perfectly.

    Any clues ?

  26. Jean-Philippe PICARAT

    Hi, i’ve created a “WordPress Network” (a WordPress multi site for multi language) for my Website, and i’ve installed Youtube simplegallery on my Network. YSG is activate for my network.
    Everything lokks good in my admin panel with Youtube simplegallery options but when i’m trying to insert [youtubegallery]...[youtubegallery] on my page, nothing happens. WP consider this as text…

  27. P Rottenham

    The biggest improvement you could make to this plugin is to make it remember its settings when deactivated. Troubleshooting for conflicts would be a lot easier.

  28. NeverAgain


    Some trouble detected with plugin:
    Plugin destroy session at this place:

    line 149:

    But i need session info for shoppingcart usage, so i commented this line and all works fine. Hope this help to save time for someone with similar problem.

  29. Paolo Ciocca

    Hello there, fantastic Plugin and tks so much for your job.
    Just one question: How can I open the video on different Windows? I’ve tryed with all effect but just with none works. I’m using a responsive template on WP 3.8.1.
    Paolo Ciocca

  30. Ivo


    Using the [youtubeuserfeed] setting, it only displays a max of 25 thumbnails. Have tried everything to display more with no luck.

    Also, is there a way to display items from a specific playlist only?

  31. Marno Kotze

    Good day

    I like the plugin a lot, but after installing the fancybox plugin my gallery loads two “boxes” with the same video over eachother, is there a solution to this problem

    Marno Kotzé

    1. Marno Kotze

      never mind I solved the problem. but now i want to know if there is a way to insert a link into a video title

  32. Peter

    Great Plugin! I really love it!
    There is only one issue with it though….
    Every time a video gets removed from YouTube, instead of causing an error on the thumbnail of that specific video it stops the whole page from loading.
    If it could effect only that one video instead of the whole page then this plugin would be perfect!

  33. Michael

    All the YouTube videos open full screen with a YouTube url.
    All the Vimeo videos open in a floating window but when you close the window the browser (or tab) closes.

    I am using version 2.0.6 with WordPress 3.9.1 and FancyBox for WordPress 3.0.2

    1. CMonster

      I’m having the exact same problem with the same versions of WP, Fancybox for WP and YT Simple gallery.

  34. Aaryn

    The YouTube simple gallery was working like a charm until we changed our site to use https:// sitewide.

    The code looks something like below. I shortened the list. The front end page is at The thumbnails generated show fine but no video. So then when I change the to the thumbnails disappear.

    Any ideas? Thanks a million.

    [youtubegallery class=”fancybox iframe fancybox-youtube”]

  35. Marol

    Plugin doesnt work when attaching user’s stream.

    Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/youtube-simplegallery/inc/shortcode.php on line 107

  36. Joakim


    I’ve tried to load in a feed from the user SthlmKickboxning
    but the feed doesn’t display at all.

    when I’m inspecting the elements I can see that the plugin is appending divs to the page
    but no feed.

    Using 2.0.6

  37. James


    Not sure if this is still being supported, but I can’t even seem to find the settings menu you show in this post. It’s not appearing in the wordpress menu. Any ideas there?

  38. Grizzbir

    Warning: Invalid argument supplied for foreach() in …./public_html/wp-content/plugins/youtube-simplegallery/inc/shortcode.php on line 107

    page code: [youtubeuserfeed user=UCm7jGNRSuwPubjevIrXY61Q service=youtube]

    any ideas?

  39. Claudia

    Hi there! Great plugin! I am using it and trying to figure out in which order videos are fetched from a youtube channel? Doesnt seem to follow the “date added” order but a random one…could it be?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.