To prevent WordPress from automatically turning URLs into embeds, you can disable oEmbed for internal links. One way to do this is by adding a small function to your theme’s functions.php file or a site-specific plugin. This function would stop WordPress from treating your own site’s URLs as oEmbed sources.
Try this:
function disable_self_pingbacks( &$links ) {
foreach ( $links as $l => $link ) {
unset($links[$l]);
}
}
add_action( 'pre_ping', 'disable_self_pingbacks' );
Related Posts:
- WordPress Mediaelement – Youtube Videos Embed Options
- WP Oembed not passing through the “autoplay=1” variable
- How to add new embed handler not supported by oembed
- Manipulating oembed_dataparse stopped working for YouTube embeds
- Youtube – Embed as IFRAME
- wp_embed_register_handler is not working
- Any way to use a custom Parameter for vimeo embed without using an iframe?
- Removing WordPress Icon from oembed link footer
- Hiding Comments Icon On oembed
- Can I use wp_oembed_get to detect a valid embeddable link or is there a better way to do so?
- Embeding YouTube video via a template function throws iframe cross-domain policy error
- extra text in Vimeo Embedded videos
- Check if page is embeded
- Video Embed with Captions in Turkish
- Embed Post in external page
- How can I force oEmbed to display fixed height & width dimensions?
- How to embed YouTube videos in posts without adding suggested videos at the end?
- Div around YouTube video
- How to make enqueue_embed_scripts work with the embed_template filter
- Add class and change src type inside wp_oembed_get
- How to disable URL preview in WordPress comments
- Remove wordpress embed share icon?
- Youtube iframe embed keeps disappearing from page
- Adding an official oEmbed provider to WordPress
- How can I create iframe/embeddable content from my WordPress site?
- Completely disable oEmbed and auto-embed on frontend and post editor?
- add_filter is failing to append &rel=0 to end of YouTube URL in oEmbed
- Prevent using oEmbed for a specific domain
- How do I hide related videos at the end of a YouTube playlist embed code?
- How do I embed youtube videos with https instead of http in the URL?
- How can I change Max Embed Size in WordPress 3.5?
- Get first video from the post (both embed and video shortcodes)
- Soundcloud embed shortcode does not work
- WordPress Gutenberg Embed Blocks Are Not Responsive
- Embed iframe or html page into dashboard widget
- Modify youtube video size on one page and show another size on different page
- Give Author users the right to embed
- wp_embed_register_handler not working
- Embed .mov file via ‘Add Media’ not working
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- Detecting Embed URLs Within post_content
- How to change thumbnail of embedded Youtube video?
- Customize Embedded Tweets (or, How To Hide Photos in Embedded Tweets)
- How to remove the embed_footer?
- How to change WordPress embedded player size or show just the play button
- how to embed external webpage in my wordpress page
- use of tag into wordpress
- Is it possible to modify the default YouTube embed attributes string?
- ted talks embed fixed, but can’t control size
- Get all Youtube video’s from posts and embed them on a different page
- Embed WordPress Admin in an iframe
- How to embed a WordPress article on another website [closed]
- Youtube parameters within WordPress embed code?
- wp_embed_register_handler to embed html files
- How to add oEmbed support to my theme?
- How to create a static player top or bottom of wordpress?
- Which HTTP headers to use for subdomain embedding?
- Audio Playlists – Multiple file type support?
- wp_insert_post iframe missing
- Vimeo video embeds doesnt seem to work with ACF [closed]
- vimeo/youtube video embed with thumbnails
- Embed YouTube video from custom field value
- Search XML file from within WordPress?
- WordPress keeps altering my embed code
- disable video URL auto-embedding for a part of the post
- Instagram URL is converted into oEmbed
- How can I override print_embed_sharing_dialog() in WordPress 4.5
- Responsive embed for the video shortcode
- YouTube embed parameters?
- Embed Youtube video link in wordpress editor
- WordPress get embedded/attachment video
- pdf (25MB) – how to display and enable download?
- Outside url for post content
- want to stop stripping out from my post content
- How to register a embed handler as a fallback to a oEmbed handler?
- How to auto embedded youtube with wp_insert_post()
- Is there a way to create embed codes from wordpress/buddypress content?
- Display total questions of Moodle in WordPress [closed]
- How to display real-time data which is stored in an IBM Cloud web app
- MP4 video on wordpress working on desktop, not on mobile devices
- Embedding custom posts with REST API
- How to apply an ID to Shortcode Embedded iframe
- How can I remove the first video from a post and feature it?
- How to Implement Responsive YouTube Video Framing? [closed]
- Embedded tweets get wrapped in tags and fail to load
- How to change the way wp_embed handles only youtube videos?
- Responsive Embeds using default embed shortcode
- WordPress kills an iframe’s apostrophes
- How can I replace an oEmbed URL in post with actual embed HTML
- How To Display Content from a website on wordpress page?
- How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?
- Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)
- How to put an external object into WordPress to that occupies most of the available space?
- Embedding Youtube video on comments
- Reusing header.php from Yii application
- WordPress get_media_embedded
- Add custom parameters in SoundClound embed
- How do I not embed the SoundCloud player? I just want the link
- Add Watermark to PDF’s of logged in user in WordPress upon upload to media library [closed]
- YouTube embeded video will not resize (only full screen responsive) [closed]