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

learn more… | top users | synonyms

2
votes
1answer
14 views

Getting results from wp_oembed_add_provider

I'm having trouble getting results from wp_oembed_add_provider(). I'm developing a site which needs to embed video content from Facebook, and I came across this handy list of Facebook URL structures. ...
0
votes
0answers
37 views

Wrap Javascript embeds like Twitter and Instagram?

Is there a way to wrap Javascript embeds like Twitter and Instagram that don't use the iframe/embed type embedding? I am able to do this when those embeds (Twitter and Instagram) are using oEmbed, ...
0
votes
1answer
44 views

Wrap iframes/embeds, but do it before oEmbed happens

I am trying to wrap any iframe/embed in my content with some Facebook Instant Articles friendly code (only for that feed). I have it working, but it adds this code to oEmbed output as well which adds ...
-1
votes
2answers
44 views

oEmbed work on localhost but not on distant server

I've a trouble with oEmbed integration for YouTube on hosting server. I've a Wordpress site that is exactly the same on my localhost (MAMP 3.0.7.3 on MacOSX with PHP Version 5.6.2) and my distant ...
1
vote
1answer
27 views

Video Embed with Captions in Turkish

I normally embed videos by directly writing the URL in the WP built in [embed] code. Like: [embed]https://www.youtube.com/watch?v=p_o4aY7xkXg[/embed] But now I want this video to open automatically ...
0
votes
1answer
23 views

What are available arguments for wp_oembed_get?

I used wp_oembed_get function to embed a YouTube video. It worked like it should. Now I want to add a class to an embedded element. Is there an argument for this? Can't find list of arguments for ...
1
vote
0answers
32 views

How can I remove the first video from a post and feature it?

I am trying to develop a theme in which when you select a 'video' post format, it automatically gets the first video from the post and features it (instead of where the featured image would normally ...
0
votes
2answers
47 views

oEmbded with wp_insert_post() [embedly]

I try to add articles via wp_insert_post but as it seems the oEmbed function of Wordpress doesn't work properly. I work with embedly as you can embed any website. I realized that the oEmbed ...
4
votes
1answer
87 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 ...
0
votes
0answers
111 views

oEmbed not working

I'm having trouble getting the oEmbed (Insert From URL) to work in WordPress. Initially when I did this, it worked fine 100%. A few days later it just stopped working, but it's not just Instagram ...
2
votes
1answer
104 views

Manipulating oembed_dataparse stopped working for YouTube embeds

My go-to code to manipulate YouTube embeds does not work anymore. Can anyone explain to me what I am doing wrong? This is my code in functions.php // OEMBED FILTER function bolster_oembed_filter( ...
0
votes
1answer
33 views

Turn twitter-urls into list timelines?

I know there's the oEmbed ability to embed a specific tweet, as described in their documentation... but is there any way to simply get the latest in a particular twitter feed, without setting up an ...
1
vote
1answer
220 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 ...
1
vote
1answer
116 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
2answers
318 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 ...
3
votes
1answer
315 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 ...
0
votes
0answers
61 views

extend native WP gallery to include video embeds

Developing a website for a designer, he should be able to easily add galleries into his posts. Galleries need to accept images, video, and video embeds. Currently i have some code which separates ...
1
vote
1answer
443 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 ...
1
vote
1answer
133 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, ...
0
votes
1answer
100 views

Add parameter to first post only

I've set up a custom post type called "Videos". I have assigned an ACF oEmbed custom field to "Videos". On the archive page, I have a loop which queries the custom post type and displays all of the ...
1
vote
0answers
22 views

Fallback for oEmbed content

Is there any easy way to detect if an oEmbed url is still returning any content? And, if so, is there a way to replace the missing oEmbed content with some kind of fallback content? For instance, if ...
7
votes
2answers
320 views

When oEmbed fails, display an alternative

I want to specify an alternative image that will be displayed when oEmbed fails. The specific use case is to offer an alternative when China (or other countries) block YouTube. We know the YouTube ...
1
vote
1answer
1k views

How to change default width parameter of embedded video in wordpress?

I am using embedded video short code of Wordpress for showing video in the content of a post [embed width="600" height="456"]https://www.youtube.com/watch?v=f5CcOq8UzkI[/embed]. and the rendered ...
3
votes
1answer
80 views

How to get the oEmbed type (audio, video, image etc.)?

If I embed something with oEmbed, is there a chance to get the type of the embed (video, audio etc.) ? If I look at www.oembed.com I see that in the JSON response there is always the data type. Any ...
1
vote
1answer
228 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 ...
1
vote
0answers
353 views

Run oembed separately outside the_content()

I have this structure for my content.php : <div class="featured"> <!--featured image here--> </div> <h1 class="entry-title">Post Title</h1> <div ...
2
votes
2answers
3k views

Get first video from the post (both embed and video shortcodes)

The goal is to grab the first video (embed or shortcode) from the post. So we need to check post content if it has embedded videos ( supported by WP ) or [video] shortcodes. Multiple videos and embeds ...
0
votes
1answer
193 views

Looking to Customize YouTube Video Embeds

I am looking to embed youtube videos into my posts and publish them as custom post types (videos). I would like to be able to append the options for getting rid of the information bar, starting the ...
3
votes
1answer
777 views

Problems using WP's oembed function + Instagram + AJAX

I am using a modal to load post content via AJAX. Inside the post's template I am using wp_oembed_get() to embed different types of media (YouTube, Vimeo, Flickr, and Instagram). Everything is ...
0
votes
1answer
128 views

Add class to oEmbed video from within post editor?

I'd like to be able to add classes to oembed videos on the fly in the post editor. This way I could have some videos act like images and alignleft or alignright and have text wrap around them, while ...
2
votes
2answers
509 views

Adding a wrapper to the youtube embed automatically?

With newer versions of WordPress, YouTube auto oEmbeds. On this particular site I am working on, I need a unique div wrapper around the embedded iframe. I had a look in my functions.php but couldn't ...
0
votes
2answers
839 views

How to embed YouTube videos in posts without adding suggested videos at the end?

I have started posting YouTube videos as posts. I simply copy and paste the URL and WordPress figures out how to embed it. I like this workflow, but I don't like the embed code that WordPress ...
0
votes
1answer
102 views

Custom meta boxes ID prefix showing on first category but not others

I've created a custom post type and added some custom meta boxes using this great resource: https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress The problem, I've found, is that ...
1
vote
0answers
63 views

Conditional check for embedded video in the_content

I have a site where single.php displays the post stuff in this order: title featured image the_content I would like to remove the featured image IF the_content includes an embedded link (f.eg. to ...
1
vote
1answer
75 views

Add parameter (time) to oembed

I need to add a time parameter to the YouTube oEmbed callback. This time parameter should be set via URL. I found various answers which describe how to hook into the oEmbed callback, but none of them ...
1
vote
1answer
377 views

Display oEmbed in the_excerpt

I am currently adding add_filter('the_excerpt', array($wp_embed, 'autoembed'), 9); to my functions.php file to no avail any other suggestions would be great. Also if I add $content-width to ...
0
votes
1answer
416 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 ...
2
votes
1answer
415 views

YouTube oEmbed and privacy-enhanced mode

When you´re embed a youtube video in an iframe, you can enable the privacy-enhanced mode, so YouTube doesn´t store information about your web page visitors until they play the video. I've tried to ...
0
votes
1answer
65 views

oEmbed does not work for comments

I've got two websites, a staging and a production one. They have 99% the same setup and are hosted on the same server. They are multi-site WP installs. The issue that I've been trying to solve all ...
3
votes
3answers
529 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 ...
0
votes
0answers
256 views

Is There Something Wrong With the Iframe Video Embed Feature in WordPress 3.9.1?

Issue: When selecting & embedding the video embed code into a WordPress site, the video is not showing up or playing. From my understanding, WordPress now automatically configures for Iframe Ebmed ...
1
vote
0answers
242 views

wp_insert_post iframe missing

In my install, I used one custom page. Here I put one text field and the fck editor. This is for the title and the content. I need to insert this into a page. I used the following code $my_post = ...
0
votes
2answers
294 views

How to add oEmbed support to my theme?

oEmbed does not seem to work on my theme. I simply see the bare URL. I haven't been able to find instructions on how to implement it. Thanks.
3
votes
1answer
123 views

Enqueue script only if page has an oembed

I have a script that adds some styles to OEmbedded content. At the moment its running on every page. I was wondering if anyone knew how to only enqueue the script if the page has an OEmbed on it. I ...
4
votes
2answers
422 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 ...
0
votes
2answers
181 views

Pull Youtube Link from 2nd WP_Editor

I have 2 WP_Editors, 1 is the main editor I use for content and the 2nd is an editor I use for the user to insert videos and any extra content describing the video. My question is, is there an easy ...
1
vote
2answers
415 views

Use Auto Embed with get_post()

I have PHP script outside the WordPress directory where I'm getting the content of a specific post and now trying to apply the oembed filter on it: include('../wp-load.php'); $thePost = get_post(42, ...
0
votes
1answer
400 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?
0
votes
1answer
364 views

Div around YouTube video

My posts have YouTube embedded videos in the form of: <object width="600" height="400" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ...
1
vote
1answer
849 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 - ...