oEmbed is a format that allows a URL to be embedded on third-party websites. When a user posts a link to a resource, the simple API allows a website to display embedded content (such as photos or videos) without having to parse the resource directly. This function enables the remote embedding of any WordPress blog. This article will show you how to disable the oEmbed functionality to prevent anyone from remotely embedding your WordPress blog post
To disable oEmbed in WordPress, follow these steps:
On the Theme Editor , select the Theme you want to edit from the dropdown:
The files for this selected theme are listed on the right column under Theme Files. Click on the file named “functions.php”:
Insert the following code to the end of functions.php file and click Update File Button to save the changes:
function no_embed() { wp_dequeue_script('wp-embed'); } add_action('wp_footer', 'no_embed');
This code prevenst the related JS file from loading and other from embedding your blog posts from wordpress site.
For more information about oEmbed, please visit https://oembed.com/
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
Usamos cookies con el fin de personalizar para usted nuestro sitio Web y analizar el uso de éste. Usted acepta esto haciendo clic en “Acepto” o al continuar usando el sitio Web. Hay más información sobre cookies en nuestra política de privacidad.