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

learn more… | top users | synonyms

5
votes
0answers
65 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 ...
0
votes
1answer
28 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 ...
0
votes
0answers
11 views

Why are iframes from WordPress oEmbed stripped with wp_kses_post?

The docs for wp_kses_post() say "Sanitize content for allowed HTML tags for post content." iframe in general is an allowed tag, but more specifically I think it should allow tags created by WordPress ...
1
vote
2answers
190 views

extra text in Vimeo Embedded videos

For a WordPress site I am working on, there is a jquery slider (based on the coda slider) where videos are presented. All of the videos are from Vimeo. If a video is playing and someone slides to the ...
0
votes
2answers
305 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 ...
1
vote
1answer
117 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 ...
5
votes
5answers
7k 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 ...
3
votes
1answer
41 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
100 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 ...
0
votes
0answers
25 views

How to get generic Oembed in custom field?

I'm pretty tired right now and I guess I'm missing something. I use this piece of code to output youtube videos in my articles with a custom field. 'video_url' being the custom field name and the ...
0
votes
1answer
136 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 ...
1
vote
0answers
113 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 ...
1
vote
2answers
745 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
1answer
96 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 ...
0
votes
0answers
59 views

Calling an external file using ajax

I'm trying to create a Medium-Like editor on Wordpress. I'm using this https://github.com/orthes/medium-editor-insert-plugin I've corrected the code about embedding images, but I still have problems ...
5
votes
5answers
3k views

WP Oembed not passing through the “autoplay=1” variable

I'm having a problem here: I am passing this through a custom field: http://www.youtube.com/watch?v=E6P1Q-UycHA&autoplay=1 (notice the autoplay=1) But when I load the video on my theme using ...
0
votes
1answer
59 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 ...
1
vote
1answer
258 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 - ...
0
votes
0answers
67 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
votes
1answer
143 views

Adding a wrapper to the youtube embed automatically?

With newer versions of WordPress, YouTube auto embeds. 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
399 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 ...
3
votes
3answers
1k 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
0answers
40 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 ...
0
votes
2answers
74 views

How to center oEmbedded content

I understand you have to paste the link that you're embedding without any code wrapping around it, but how do I force the embedded content to be centered? Currently, the default is aligning to the ...
1
vote
1answer
42 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
2answers
2k views

oEmbed not recognising Vimeo URLs

I am trying to embed a Vimeo video into a post. I am inserting the URL into the page like so. Lorem ipsum dolor sit amet, consectetur adipiscing elit. http//vimeo.com/1234 Lorem ipsum dolor sit ...
0
votes
0answers
50 views

How to add a field to live preview in post editor?

WordPress 4.0 allows live previewing of certain shortcodes while editing a post. How can I customise the options that appear when I edit my embedded video? I want to add a custom field below the ...
1
vote
1answer
123 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 ...
3
votes
3answers
324 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
2answers
163 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.
2
votes
1answer
144 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
38 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 ...
0
votes
0answers
55 views

Stripping tags from oEmbed and adding a <div>

I have these two functions as follow: function filter_ptags_on_iframe($content){ return preg_replace('/<p>\s*(<iframe .*>*.<\/iframe>)\s*<\/p>/iU', '\1', $content); } ...
0
votes
0answers
192 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
110 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 = ...
3
votes
1answer
100 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 ...
3
votes
2answers
304 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
101 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 ...
0
votes
1answer
224 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
2answers
258 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, ...
2
votes
2answers
1k views

Get all Youtube video's from posts and embed them on a different page

Is this possible? I want to let it check all my posts to see if there is a embedded Youtube video. If so, I want to show that on a different page, embedded and linking to that particular post... I ...
0
votes
1answer
258 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
279 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 ...
1
vote
1answer
184 views

add oembed provider

I want to add oembed provider to my buddypress activity content I found this function <?php wp_oembed_add_provider( $format, $provider, $regex ); ?> I know I need it to add with init filter ...
6
votes
2answers
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 ...
0
votes
2answers
108 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 ...
1
vote
1answer
237 views

How can I replace an oEmbed URL in post with actual embed HTML

What I want is to get the output of the Twitter oEmbed system into my actual posts. IMHO the embed output itself is high-quality, semantic HTML and I'd rather have it inside the post than in the embed ...
0
votes
0answers
84 views

Conditionally enable autoplay when using oEmbed in a custom widget

I'd like to have all oEmbed urls (youtube, vimeo, soundcloud, etc.) behave as they usually behave, with one exception. In my theme I've created a widget that gets data from a given post. The post ...
1
vote
1answer
3k 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 ...
1
vote
2answers
317 views

Embedding screencast.com Videos in WordPress Multisite

I've got a multisite installation of WP 3.5.1 running, and I'd like to for users to be able to embed screencast.com videos into posts, preferably with a shortcode like you do with YouTube or Vimeo. I ...