0

I'm developing a site where I'm using oEmbed through Advanced Custom Fields, to display vimeo-videos. This is major feature for the site, and one of the clients requests is that he/she needs to be able to update the site with new content, with ease. Which is why I'm using ACF and oEmbed.

However, I noticed that there is a 50% chance that the oEmbed fails and will only output the hyperlink. This is not acceptable and I need to find a solution. And I thought that maybe I could find some help here.

Could I potentially refresh the oEmbed requests until it successfully loads, through javascript?

Many thanks.

0

Ok, I found a work-around that works just as good, it functions and it's still easy for the end-client to update.

The problem seems to lie within Advanced Custom Fields's oEmbed function. First, I created a field with the type of "oEmbed" (PRO-version only), where I would later in the post just copy and paste the vimeo-link of my choosing. And as I stated before, it fetched the video around 50% of every on-site refresh.

However, as I looked around and realized that WordPress do have these embed features already built into it; I thought I could just as well create another field, but with the type of "Wysiwyg Editor" instead, and paste the url in that field and see what happens.

The result: I've loaded the page around 50 times now and it loads correctly every time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.