Clear oEmbed Cache Automatically on Course Save

Normally this is not required, but if you’re running an old installation of WordPress and you’re facing issues with the oEmbed cache, the script below may solve the issue.

oEmbed is what WordPress uses to grab embed code for several different embeddable content (for example, YouTube and Vimeo videos). But sometimes the embed code that your WordPress receives through oEmbed is damaged. If this happens, the only solution is to clear your oEmbed cache so that WordPress knows it needs to try to fetch the new embed code.

This is not recommended, nor required under normal circumstances, but it works really well as a fix if you’re constantly in the position where you need to clear the oEmbed cache every time you add a new Course.

You need to add the following PHP Snippet in your installation, either in the child theme functions.php, or as a separate plugin.

in FAQ’s

Related Articles