Closed kaylima closed 4 years ago
Example post ID is 34942
$ wp post meta get 34942 _bunyad_featured_video
<iframe width="640" height="360" src="https://www.youtube.com/embed/EbjxpVAi-v4?rel=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
The easiest way to do this is to:
largo_get_hero
that modifies the hero DOM if the _bunyad_featured_video
metadata is set
https://github.com/INN/largo/blob/f50df16e9e06fb9402802e2f1ce76ce058d26d76/inc/featured-media.php#L73-L82The applicable hero partial would appear to be https://github.com/INN/largo/blob/trunk/partials/hero-featured-embed.php
We can use that partial if we render it in a way similar to largo_get_featured_hero
, which sets up an array $context
and then uses largo_render_template
to render it:
https://github.com/INN/largo/blob/f50df16e9e06fb9402802e2f1ce76ce058d26d76/inc/featured-media.php#L106-L135
https://github.com/INN/largo/blob/f50df16e9e06fb9402802e2f1ce76ce058d26d76/inc/featured-media.php#L157
A bunch of posts had videos embedded by either using a plugin or the site builder.
Please compare the following (live site has an embedded video, staging does not):
EXPECT: figure out what happened and then see if we can get all the videos migrated to the staging site