Hello,
In a website with 3000+ articles, I pull a youtube video url (youtube.com/watch?v=XXXXX) from a custom field, then into the template file I filter it through the_content: <?php echo apply_filters('the_content', *customfield*); ?>
so it can be automatically oEmbedded.
Now my client wants to autoplay those videos in all the articles and I'm having troubles doing it.
Manually appending ?autoplay=true to the video url appears to be not supported by oEmbed: the url will not be embedded.
I also tried to code the embed iframe into my template file: <iframe src="*customfield*" frameborder="0" allowfullscreen></iframe>
but it does not work because it requires the url to be youtube.com/embed/XXXXX whereas all my custom field data is in the youtube.com/watch?v=XXXXX format.
So my only solution is to manually edit all 3000+ articles to transform the "normal" youtube urls into the embedded ones?
Am I missing something here? Maybe some oEmbed filter that I don't know how to use?
Thank you for your time