Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [oembed]

A protocol for allowing an embedded representation of a URL on third party sites.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Not allowing my site to be embedded elsewhere via oEmbed

Kind of "bizarre" question here. Is there a way to disable the possibility of embedding (via oEmbed) my site elsewhere and instead having only the URL shown? If you copy a URL into the block ...
Dande's user avatar
  • 25
2 votes
0 answers
9 views

Disable the buildin embed only in the editor

I want to disable the automatic embed system of WordPress for block editor and classic editor. This is what I tried: function disable_embeds_editor_support() { remove_action('pre_oembed_result', '...
Nordi's user avatar
  • 21
1 vote
0 answers
16 views

Prevent using oEmbed for a specific domain

We have a custom block that lets people embed content from https://somedomain.com. The problem is that somedomain.com supports oEmbed poorly, and we’d rather use our own block. Currently, if someone ...
MadtownLems's user avatar
0 votes
0 answers
31 views

add_filter is failing to append &rel=0 to end of YouTube URL in oEmbed

I'm working with a WordPress website owner who wants to only display their own videos in the "Related Videos" at the end of each embedded video. I've used Chrome Inspector to demonstrate ...
user3169905's user avatar
0 votes
1 answer
67 views

Including plain text URL to post on same site is converting the URL to an embed

If I paste a plain text link (non-hyperlinked) to a post on the same site (using Classic Editor) it converts the post's URL to an iFrame embed. For example if my site is https://mysite.local and the ...
Gavin's user avatar
  • 384
0 votes
0 answers
65 views

wp_editor mce-view

We are using the wp_editor on a page on the front-end to allow subscribers to create a cpt post. We added support for auto-turning youtube urls into embed tags: function mce_scripts() { ...
shanebp's user avatar
  • 5,063
0 votes
1 answer
120 views

Iframe beeing removed when embeding a video through block in Sensei LMS (Vimeo)

I have a strange problem with production server and Sensei LMS Vimeo embeded video. When I try to embed video through Vimeo block it works (partially, on second time when I load the page). But when I ...
smarcin22's user avatar
  • 101
0 votes
0 answers
22 views

Custom Post Type - how to get video urls to automatically result in embedded video?

I've created a custom post type that mostly follows the same setup as posts in order to more easily manage a particular group of content -- most of those posts will include multiple videos (loaded ...
ScottM's user avatar
  • 45
1 vote
0 answers
25 views

Oembed is not clickable

I am pasting an article from the New York Times into standard WordPress Gutenberg editor, which automatically attempts to use Oembed to fetch it. It succeeds, but the result is not clickable; it's ...
The9mm's user avatar
  • 33
0 votes
0 answers
43 views

What causes the difference in the twitter embeddings?

I noticed that the way WP sites embed tweets slightly different. To avoid issues when embedding tweets in my own site I'd like to understand the details. 1) Embed in <div class="oembed-cached&...
Abid's user avatar
  • 143
1 vote
2 answers
601 views

Avoid embedding YouTube videos and open them in a new window

I'd like to avoid loading as much foreign Javascript and Cookies as possible on a couple sites, and I'd like to know if there's an easy way to avoid the embedding of YouTube videos, and instead, load ...
Andor's user avatar
  • 113
0 votes
1 answer
303 views

When formatting an oEmbed iframe, how (and where) does WordPress determine the height value?

When formatting an oEmbed iframe, how does WordPress determine the height value? A pointer to the code that does the working out would be good too.
Matthew Brown aka Lord Matt's user avatar
0 votes
1 answer
263 views

How to cache WordPress oembed links in the page header?

WordPress places JSON oembed links in the page header, such as in this example: <head> ... <link rel='https://api.w.org/' href='http://example.com/wp-json/' /> <link rel="alternate&...
Blake Patterson's user avatar
1 vote
0 answers
91 views

Add title attribute to oEmbed iframe for accessibility

On page https://dekamarkt.meoconcept.nl/video/ there is a video in an iframe element. This iframe element has been given a title attribute with a description, this is well taken into account. However, ...
Jordy Kolster's user avatar
0 votes
1 answer
135 views

Wordpress get_media_embedded

test text <div class="video"> <?php $media = get_media_embedded_in_content( apply_filters( 'the_content', get_the_content() )); print_r($media); ...
Talha's user avatar
  • 1
1 vote
0 answers
241 views

Is there any way to render the WordPress Gutenberg core/embed block in PHP by passing in the URL?

I'm trying to render the block HTML dynamically by injecting it within a core/query block. The injection is working fine using DOMDocument, but I can't find out how to render the embed HTML. I can use ...
Mark Howells-Mead's user avatar
0 votes
0 answers
64 views

Is it possible to embed a wordpress tag page on wordpress?

I'm trying to use the "Embed URL" block to include another WP site's tag page on my WP page. It seems like I'm able to embed individual posts from that site (so the theme supports embedding)...
milpool's user avatar
  • 101
0 votes
0 answers
561 views

Is there a way to find all posts with Youtube video embedded?

Is there a way to search all posts and pages in my WordPress site and find those who have a Youtube video embedded in them? The reason to do that is I want to disable the wp-embed.min.js but before ...
alancc's user avatar
  • 41
0 votes
0 answers
26 views

WordPress fails to embed video URL on specific theme

My developer created custom theme for WP, and for some reason Wordpress fails to embed video URL on user-end. Everything is fine with Default WP themes, also video is fine on visual mode, but if I ...
David's user avatar
  • 1
2 votes
0 answers
218 views

oEmbed in wordpress multisite not working

We've multisite on single wordpress installation. For example, Main site - testsite.com/ Sub site - testsite.com/subsite Now when I try to embed a blog from subsite into mainsite or vice verca or post ...
dhruv's user avatar
  • 21
0 votes
0 answers
402 views

How to add srcdoc attribute to YouTube oEmbed in Gutenberg oEmbed Block

First of all, let me mention that I have already looked at the following two similar questions: Is it possible to modify the default YouTube embed attributes string? Filter oembeds tags to modify ...
iSaumya's user avatar
  • 934
0 votes
1 answer
133 views

oembed_cache SPAM problem [closed]

I recently found hundreds of posts with post_type oembed_cache while looking into my database. Many of them appear to be spam. I can't for the life of me figure out how there are being injected into ...
Medium_D's user avatar
2 votes
1 answer
470 views

WordPress 5.3.x YouTube oEmbed is not working

We followed Brian Fegter's answer to display YouTube videos using WordPress' oEmbed feature: // Public video. $video_url = 'https://www.youtube.com/watch?v=1lODe0i7dNw'; require_once(ABSPATH . 'wp-...
Mayeenul Islam's user avatar
2 votes
1 answer
185 views

Post preview and oembed provider issue using polylang plugin with subdomains

[ X ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate. [ X ] The issue still exists against the latest master branch of Polylang and the latest WordPress ...
Nils Riga's user avatar
0 votes
0 answers
38 views

Facebook embeds fixing with functions.php

I use this code to solve the new Instagram embeds problem on my old Wordpress site: add_filter('oembed_providers', 'fr_replace_deprecated_instagram_api', 10, 1); function ...
Viktor Nagy's user avatar
0 votes
0 answers
67k views

Embed video from streamtape using direct link

Good Afternoon, i want to embed this video in my wordpress https://streamtape.com/v/7qDqGjlQe4UA9MR/Soul_Land_03_VOSTFR.mp4 Embed code <iframe src="https://streamtape.com/e/7qDqGjlQe4UA9MR/...
Ferréol's user avatar
0 votes
1 answer
22 views

How to automatically search my entire site for any content embedded using oEmbed?

How can I carry out an automatic search of all pages/posts on my site for any content embedded using oEmbed (preferably Facebook/Instagram content)? The reason I ask is because this WPBeginner post ...
cag8f's user avatar
  • 1,917
1 vote
1 answer
187 views

How to oEmbed MySite in Wordpress

Could somebody please help me understand how to debug this and what to do? In short I created a oembed provider and added it to wordpress. I see that wordpress got in response the correct json. But ...
Nils Riga's user avatar
1 vote
1 answer
854 views

Styling text and images in the_content()

So I have recently started working on Wordpress and coming from a different programming background, having the logic but not being able to actually code is an issue I have been butting my head on for ...
Anuj Kaithwas's user avatar
1 vote
0 answers
37 views

Worrisome oembed hits

I'm getting oembed hits to my wordpress site that look like some kind of hacking attempts. Here's an example: /wp-json/oembed/1.0/embed?url=https%3A%2F%2FMySite.com%2Fprivacy%2F&format=xml&...
Mike Witt's user avatar
1 vote
0 answers
46 views

How can I grab the video id of youtube?

I tried $videoID = wp_oembed_get( get_post_meta( get_the_ID(), 'video_url', true ) ); but that doesn't seem to do anything. I'm trying to set playlist id as the video id so the video loops itself. ...
needyourhelp's user avatar
0 votes
0 answers
262 views

Cannot display the_content() after removed WordPress 5's auto embed feature (iframe & blockquote)

Novice here, please help. I made a dynamic page with Custom Post Type UI plugin where the user can input news updates. The information to be filled are date, title, and a link (a clickable button that ...
Elski's user avatar
  • 1
0 votes
1 answer
62 views

Security when outputing wp_oembed_get code

This is a code I have in a function.php action. It is responsible for getting and displaying an embed code. Typically there is a youtube link from $embed_link but it comes from a public form so it can ...
Robert Brax's user avatar
2 votes
2 answers
335 views

Register Embed Handler for Padlet.com

I'm trying and failing to register an embed code for content from padlet.com (strangely it's supported in WP.com but not WP.org). A URL like https://padlet.com/cogdogblog/aos9fosbbwk4 should embed ...
cogdog's user avatar
  • 141
0 votes
1 answer
754 views

How to disable URL preview in Wordpress comments

I disabled URL embed in Wordpress using the following code in functions.php: function my_deregister_scripts(){ wp_dequeue_script( 'wp-embed' ); } add_action( 'wp_footer', 'my_deregister_scripts' ); ...
Alex's user avatar
  • 181
1 vote
1 answer
593 views

How do I phpunit test a post output process?

I like to know how to test the html output of a post. Like WP would output it on the frontend in reality. My specific case at this point is to test oembed caching as I want to test re-caching. AFAIK ...
NextGenThemes's user avatar
3 votes
2 answers
558 views

How to remove the embed_footer?

I'm trying to remove the entire embed_footer from WordPress embedded posts. By adding the following code in the functions.php, I was able to remove the site title and comments icon. But still, the ...
Libin's user avatar
  • 276
1 vote
1 answer
1k views

Applying an oEmbed filter to a custom post type

I have a function in my functions.php file which takes any embedded YouTube URL, appends &rel=0 to the end of the URL, and wraps it in a <div>. It works perfectly for YouTube URLs I paste ...
GermanKiwi's user avatar
0 votes
1 answer
445 views

Combine embed_oembed_html and oembed_result

I have two functions that are exactly the same, because they are applied to different filters...is there any way to combine them so I don't have to write them out twice? My code: function ...
Josh Rodgers's user avatar
  • 1,173
0 votes
0 answers
539 views

How to disable oembed cache service?

Today I delete all oembed records by postmeta where meta_key like '_oembed%' after 5 mins, check again the table, magic, the wordpress started to insert _oembed records again (9857 total)... Can ...
Zakari's user avatar
  • 121
1 vote
0 answers
125 views

How to set up front end editor to autoembed media for non-logged in users?

I have a series of themes that allow site visitors to contribute content as posts (they enter as drafts) from a front end editor. I have been using a technique of invisibly logging them in as an ...
cogdog's user avatar
  • 141
0 votes
0 answers
116 views

How do I keep my iframes responsive and scaled to fit their container?

This is a WordPress core question and only a CSS question as a byproduct. I am designing a theme using bootstrap. Everything looks exactly as I want it to with one exception - links embedded from my ...
Matthew Brown aka Lord Matt's user avatar
0 votes
0 answers
78 views

What is the correct way to obtain access to the WP_oEmbed object?

I know that WP_oEmbed is a class used by WordPress to handle oEmbeds. Is this available as a global or should I create a new instance of it? Update: I have found a function called ...
Matthew Brown aka Lord Matt's user avatar
1 vote
1 answer
471 views

Can I use wp_oembed_get to detect a valid embeddable link or is there a better way to do so?

I am looking for an efficient way to detect if user input is a valid embed link (and of what type). I know that one can cause WordPress to run its embed code with arbitrary input. For example, like ...
Matthew Brown aka Lord Matt's user avatar
1 vote
0 answers
144 views

How to register a embed handler as a fallback to a oEmbed handler?

Testing this with the Embed Gutenberg Block. In the backend it actually shows the video so this seems wrong that it behaves differently there. Registering embed handlers causes the to take priority ...
NextGenThemes's user avatar
1 vote
1 answer
3k views

oEmbed 404 errors when trying to use embed block

When trying to add a Youtube Embed Block in the Gutenberg editor, I'm seeing these 404 errors in the browser console: GET https://example.com/wp-json/oembed/1.0/proxy?url=https%3A%2F%2Fwww.youtube....
protohominid's user avatar
1 vote
0 answers
3k views

Advanced Custom Fields oEmbed video width and height

I'm using Advanced Custom Fields plugin and i have a oEmbed field in it where i want to display YouTube videos. This is how they look now: http://electives-abroad.org/custom-field-test/ Why do they ...
Draws Ren Gundam's user avatar
0 votes
0 answers
348 views

oembed_dataparse filter not running at all for standard YouTube embed

I need to wrap a div around all YouTube embeds in posts on our WP site. WordPress version is 4.9.6 The posts in question are WooComerce products Videos are being embedded by simply pasting a YouTube ...
Ade's user avatar
  • 101
2 votes
1 answer
931 views

What is the correct oembed provider base url for self-hosted wordpress sites

I used to have both PCsteps.gr and Lifesteps.gr on the same server with the same IP. Oembed would work by default, I could embed posts from one site to the other without any problems. However, since ...
Angelos Kyritsis's user avatar
0 votes
1 answer
681 views

Remove wordpress embed share icon?

I am modifying my embed-content.php. I find the functions here to remove some oembed icons but not the share icon. I do not find a function to remove JUST the share icon on wordpress oembeds. Can ...
lazyym's user avatar
  • 1