Thomas Batcheler

Thomas Batcheler

Hi all,
I've tried everything i can but can't seem to get this to work.

I am using wordpress as a cms and will be posting videos by using a php field that i've created where i enter the ID number and it inserts that into the embed code.

This works fine and is done with the code:

< ? p h p e c h o $ v i m e o i d ; ? >
(extra spaces so that i can post it)

problem is, i want to use the vimeo thumbs as the links to each video on my index page. i tried using the oembed api and using the above code in the url but it only works on the first instance and not the rest.

Here is my mangled attempt at the code:

var callback = 'showThumbs';
var url = '<; ? p h p e c h o $ v i m e o i d ; ? >.json?callback=' + callback;
function showThumbs(clips) {
var thumbs = document.getElementById('thumbs');
thumbs.innerHTML = '';
for (var i = 0; i < clips.length; i++) {
var thumb = document.createElement('img');
thumb.setAttribute('src', clips[i].thumbnail_medium);
var p = document.createElement('p');
function init() {
var js = document.createElement('script');
js.setAttribute('type', 'text/javascript');
js.setAttribute('src', url);
window.onload = init;

Loading clips...

Does anyone know what repeating code i can use for each instance? Any help would be REALLY appreciated!

Thanks so much

P.S URL of site:

This conversation is missing your voice. Please join Vimeo or log in.