Skip to content

How to fix WordPress Facebook and Instagram oEmbed issues?

How to fix WordPress Facebook and Instagram oEmbed issues?

How to fix WordPress Facebook and Instagram oEmbed issues?

If you use WordPress and embed content from Facebook and Instagram on your website, you may have experienced problems with oEmbed not functioning properly.

Your embedded posts might not appear properly or at all when this occurs. Fortunately, you can troubleshoot and resolve this problem by following a few simple steps. We’ll walk you through the process of fixing WordPress’s Facebook and Instagram oEmbed issue in this blog post.

Step 1: Check Your Embed Code

Making ensuring your embed code is right is the first step. Make sure the Facebook or Instagram post’s Link is on its own line and not enclosed by any other text or HTML tags if you’re using WordPress’ embed feature. Also, make sure the URL is in a paragraph of its own and not in another paragraph.

Here is an illustration of proper embed code:

<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzuck%2Fposts%2F10102370403295571&width=500" width="500" height="678" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>

Step 2: Check Your Facebook and Instagram Accounts

Make sure your Facebook and Instagram accounts are configured properly as the following step. Check to see if your Facebook and Instagram profiles are set to public rather than private. You won’t be able to embed your posts if your profiles are set to private.

Step 3: Clear Your Cache

The oEmbed procedure may occasionally be hampered by the cache on your website. You must erase the cache on your website in order to resolve this problem. If you’re using a caching plugin, clear the cache in the plugin’s settings. If you don’t use a caching plugin, you might need to get in touch with your hosting company for assistance in clearing the cache.

Here’s an illustration of how to delete the cache using the WP Fastest Cache plugin:

if (function_exists('wpfc_clear_all_cache')) {
    wpfc_clear_all_cache();
}

Step 4: Use a Plugin

If none of the above steps work, try using a plugin to fix the oEmbed issue. There are some plugins that can solve this problem. One such plugin is the Disable Embeds plugin. This plugin can disable WordPress embed functionality and fix oEmbed issues.

To use the Disable Embeds plugin, simply install and enable it in your WordPress dashboard. Activating the plugin disables WordPress embed functionality. Then try embedding your Facebook and Instagram posts again to see if the oEmbed issue is resolved.

Here is an example of installing and activating the Disable Embeds plugin:

// Install the plugin
if ( ! function_exists( 'wp_install_plugin' ) ) {
    require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$plugin = 'disable-embeds/disable-embeds.php';
wp_install_plugin( $plugin );

// Activate the plugin
activate_plugin( $plugin );

Make sure your accounts are configured correctly, check your embed code, clear your cache, and try utilizing the plugin to fix Facebook and Instagram difficulties on your WordPress website. If that doesn’t work, try the next set of actions: Check your embed code, then ensure that your Facebook and Instagram accounts are set up successfully, then clear your cache, and finally, try utilizing the plugin.

If you need any help, Contact us.

Hire Us

Recommended Posts

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *

Shopping cart