November 14, 2011

Vimeo Not Working With PrettyPhoto

Recently I had project where I had to take Vimeo links and have the videos pop up in lightbox, and in this case I chose PrettyPhoto. I built the site in WordPress and used custom fields as a place the client could post their Vimeo links. For some reason though, the links were turning into iFrame embeds which was throwing all sorts of errors. I couldn’t for the life of me figure out why this was happening. I tried adjusting code in prettyPhoto, disabling scripts, disabling plugins, everything! My frustration was growing and I called it a day.

As I was walking to the bus I called my fellow developer friend and explained the problem. He told me, “Did you check the WordPress Auto-Embed to make sure it was turned off?” OH. MY. GOSH. I couldn’t believe I had missed that. It might sound stupid, but sometimes the solution is easier than we think. The moral of the story is that we have to explore the easiest solutions first, then move on to the more complex conflicts.

If you were wondering where this was in the WordPress Admin, it is under “Settings > Media”. Just uncheck the box like I’ve done here. Hope this saves somebody some time!

The solution to Vimeo and PrettyPhoto Conflict