Questions tagged [oembed]
A protocol for allowing an embedded representation of a URL on third party sites.
31
questions
5
votes
1
answer
6k
views
oEmbed, thumbnails and wordpress
Wordpress has wp_oembed_get, which I use to get rich media content with embed.ly. I've previously used oEmbed api calls such as this. As you can see it provides thumbnail_url, which I like to use ...
5
votes
1
answer
4k
views
How can I clear oEmbed caches for YouTube on posts as they are loaded
I have a site with tons of posts hundreds/thousands of which have YouTube videos embedded. Most use the default [embed]youtube_url[embed] format and the actual embed code is stored in the oEmbed ...
5
votes
2
answers
5k
views
Featured Image of Video from oembed
For Wordpress, I want to auto generate thumb of the video embedded on a page using oembed? And then save it as a featured image of the post.
Any idea how to do this?
7
votes
2
answers
5k
views
how to create a conditional content_width for a wordpress theme?
I'm trying to create a conditional statement for the content width in the functions.php of my theme. So some categories will have a content_width of 580, some will have 900. This will make the oEmbed ...
4
votes
2
answers
733
views
Heartbeat API oEmbed
By default running content through the_content filter automatically checks for oEmbed content. However when returning data through heartbeat_received the filter for oEmbed doesn't seem to work.
For ...
3
votes
1
answer
2k
views
How to add new embed handler not supported by oembed
I am looking to embed videos from websites that do not offer oembed support, but the reference offered on wp codex about wp_embed_register_handler() is just too broad for someone like me.
I tried ...
3
votes
3
answers
4k
views
Extract the first oembed url inserted on the content of a post
I want to extract the first oEmbed url inserted on the content of a post in order to put in a meta tag from the header, or elsewhere as a way to style it differently from the rest of the content.
1
vote
1
answer
933
views
How to use oEmbeds on Post Content during AJAX requests
I have an AJAX request that returns a post. The post_content has links to Twitter, YouTube, TED and other platforms that are registered as oEmbed providers in a default, vanilla WordPress install. By ...
0
votes
2
answers
139
views
Forcing oembeds to top of post
What's the best way to force oembed (or shortcodes too) to the top of a post?
I'd like to feature youtube embeds before the actual article content, regardless of where the link was inserted. Any ...
9
votes
2
answers
7k
views
How to wrap oEmbed-embedded video in DIV tags inside the_content?
I am making a Wordpress Theme for a website with video tutorials. I would like to put the video that is embedded in the content (with oEmbed) in a apart div.
An example
The full content (output from ...
5
votes
1
answer
862
views
Correct regex for wp_embed_register_handler
THE GOAL
I'm trying to parse a url and convert it to an embedded video player in my post's content but I think my regEx is off or I'm not creating a provider correctly.
THE CODE
Here is what I have ...
5
votes
1
answer
12k
views
Apply the_content filter to a custom field with multiple values
I have a custom meta box set up that allows users to paste the Youtube URL of a video so that it can be embedded into a post/page.
The meta box can be repeated so that a user can add as few or as ...
5
votes
4
answers
27k
views
How to Replace YouTube Videos with a "Click to Play" Thumbnail?
I use a lot of embedded videos (via oembed) on my blog, and that can slow down page loads.
Is there a way to automatically replace YouTube (and other) videos with a thumbnail (preferably the post's ...
4
votes
3
answers
1k
views
Modify youtube video size on one page and show another size on different page
I have to display three videos (custom post type) on my first page. When clicking on the link, the post is displayed and video should be in default width.
Can you help to find out how to change width ...
3
votes
1
answer
2k
views
Any way to use a custom Parameter for vimeo embed without using an iframe?
I am trying to get some oembed parameters attached to my Vimeo clips. I tried to get it going using the following two instructions:
Passing Parameters to a Vimeo link in a WordPress Custom Field - ...
3
votes
1
answer
975
views
WordPress oEmbed W3C Validation
I recently built a theme that utilises the oEmbed feature in WordPress.
Where possible, I like my themes to validate via W3C. The content of the website is driven by Vimeo videos, so I'm getting ...
3
votes
1
answer
3k
views
How to use get_media_embedded_in_content function
I am trying to figure out how to use this new WordPress function.
get_media_embedded_in_content (string $content);
The documentation says, "a string that might contain media data" but that is too ...
3
votes
1
answer
3k
views
Detecting Embed URLs Within post_content
I need to change the way WP outputs html when given an embed URL within the content. Example content within the WP editor:
This is standard content and will be wrapped in a 'p' tag. But check out ...
3
votes
1
answer
474
views
Displaying oEmbed errors?
Sometimes embedding an item via oEmbed is not possible, for example when a YouTube video has embedding disabled. The oEmbed service will return a 401 Unauthorized, and the code will not be converted.
...
3
votes
2
answers
425
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 ...
3
votes
1
answer
4k
views
Add wrapper to only youtube videos via embed_oembed_html filter function
I have a filter working to wrap embed_oembed links in a responsive wrapper. See code.
add_filter('embed_oembed_html', 'wrap_embed_with_div', 10, 3);
function wrap_embed_with_div($html, $url, $attr) ...
2
votes
1
answer
1k
views
Disable oEmbed for a Single Shortcode or at Least All Internal Links
Is there any way to disable the oEmbed functionality only for a specific call of the do_shortcode() function in just one script or if that is not possible can it be disabled for all the internal links ...
2
votes
1
answer
2k
views
Filter oembeds tags to modify iframe attributes
By default, when putting another WP url inside a post/page, it oEmbeds it and produces a blockquote and iframe code with the default in the front-end:
<iframe class="wp-embedded-content" sandbox="...
2
votes
2
answers
4k
views
Disable automatic oEmbed of a youtube url within the content
I run a small site based on wp with user generated content. Users often submit youtube links. And then wordpress automatically converts these links to videos which is unwanted in our case. I need to ...
1
vote
1
answer
611
views
Set first oembed in post to a global variable or function
I have a function that gets the first oembed in the post.
I got the code from this related post.
add_filter('embed_oembed_html', 'my_function',10,4);
function my_function( $cache, $url, $attr, $...
1
vote
1
answer
1k
views
wp_embed_register_handler is not working
I used this function for other video hosts, but for some reason, now it's not working. This is the direct and embed code of the video
https://vidoza.net/r2jeim68kuq6.html
<IFRAME SRC="https://...
1
vote
1
answer
4k
views
oEmbed youtube video aspect ratio
When I insert youtube video in my post by just putting the link(http://youtu.be/KvtkknNawCQ).
The video aspect ratio becomes 4:3.
How can I change to 16:9?
1
vote
3
answers
5k
views
Add parameters vimeo videos using wordpress embeds
I am using a custom field to embed any supported video on Wordpress
so for example the user enters a video address on the custom field box :
http://vimeo.com/72104173
and I implemented the ...
0
votes
1
answer
2k
views
Removing WordPress Icon from oembed link footer
I am trying to remove the default WordPress icon that displays on oembed links when there is no site icon. Here is a link to the site(3 links at the bottom) https://libsource.com/library-as-a-service/...
0
votes
1
answer
318
views
oEmbed fails half of the times. Could I reload the request on fail?
I'm developing a site where I'm using oEmbed through Advanced Custom Fields, to display vimeo-videos. This is major feature for the site, and one of the clients requests is that he/she needs to be ...
0
votes
1
answer
1k
views
oEmbed vimeo with add_query_arg parameters not inserted to HTML
I'm trying to add some parameters to oEmbeded Vimeo videos on my homepage template. I used the solution (with add_query_arg) that @splashingpixels suggested here: Add parameters vimeo videos using ...