Tutorials / AMP plugin compatibility

If using AMP (Accelerated Mobile Pages) or planning to use it, you will need to implement some small customizations in your theme functions.php file in order to embed the videos imported by the plugin in AMP pages.

We recommend to implement the changes into a child theme functions.php in order to make sure you don’t lose your changes when updating the theme.

The code that needs to be implemented is quite simple:

This is it, for pages generated by AMP plugin, the YouTube plugin will simply output a link of the video into the post content and everything else will be handled by AMP plugin.