Title: Remove oEmbed
Last modified: August 7, 2023

---

# Remove oEmbed

 *  Resolved [ofmarconi](https://wordpress.org/support/users/ofmarconi/)
 * (@ofmarconi)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/remove-oembed/)
 * Hello, I would like to know if you intend to disable OEMBED too, currently I 
   use a code snippet:
 *     ```wp-block-code
       function disable_wp_oembeds() {
         // Remove the REST API endpoint.
         remove_action('rest_api_init', 'wp_oembed_register_route');
         // Turn off oEmbed auto discovery.
         add_filter('embed_oembed_discover', '__return_false');
         // Don't filter oEmbed results.
         remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);
         // Remove oEmbed discovery links.
         remove_action('wp_head', 'wp_oembed_add_discovery_links');
         // Remove oEmbed-specific JavaScript from the front-end and back-end.
         remove_action('wp_head', 'wp_oembed_add_host_js');
         // Remove oEmbed from comments
         remove_filter('comment_text', 'do_shortcode', 11);
         // Remove oEmbed CSS styles
         add_filter('embed_oembed_styles', '__return_false');
         // Remove oEmbed from RSS feeds
         remove_filter('the_content_feed', 'wp_staticize_emoji');
         remove_filter('comment_text_rss', 'wp_staticize_emoji');
       }
       add_action('init', 'disable_wp_oembeds');
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Bowo](https://wordpress.org/support/users/qriouslad/)
 * (@qriouslad)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/remove-oembed/#post-16954485)
 * [@ofmarconi](https://wordpress.org/support/users/ofmarconi/) Maybe. Noted for
   now. Thanks for the code snippet.

Viewing 1 replies (of 1 total)

The topic ‘Remove oEmbed’ is closed to new replies.

 * ![](https://ps.w.org/admin-site-enhancements/assets/icon-256x256.png?rev=3099794)
 * [Admin and Site Enhancements (ASE)](https://wordpress.org/plugins/admin-site-enhancements/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-site-enhancements/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-site-enhancements/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-site-enhancements/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-site-enhancements/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-site-enhancements/reviews/)

## Tags

 * [oEmbed](https://wordpress.org/support/topic-tag/oembed/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bowo](https://wordpress.org/support/users/qriouslad/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/remove-oembed/#post-16954485)
 * Status: resolved