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

learn more… | top users | synonyms

1
vote
1answer
101 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
69 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
42 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 ...
0
votes
0answers
28 views

oEmbed single custom field with multiple values

I need to display a single custom field with multiple values, but I need to display those values with oEmbed on it. I found this, but it only shows a single value: echo wp_oembed_get( ...
1
vote
0answers
12 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
250 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
227 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
33 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 ...
3
votes
1answer
65 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
145 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
39 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 ...
1
vote
0answers
189 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 ...
0
votes
2answers
1k 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
130 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
94 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 ...
1
vote
1answer
281 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
76 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 ...
0
votes
2answers
261 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
545 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
82 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
50 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
56 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 ...
0
votes
0answers
64 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
197 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
224 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
267 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
39 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
410 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
219 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
136 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
198 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
104 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
336 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
122 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
297 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
275 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
288 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
438 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 - ...
1
vote
1answer
386 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
220 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 ...
1
vote
2answers
879 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
2answers
84 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 ...
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
2answers
115 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
294 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
85 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 ...
3
votes
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 ...
3
votes
1answer
1k views

How to oEmbed from custom field, responsive to container size and responsive

I am using Magic Fields 2 to add custom fields/meta boxes. One custom field is for a Vimeo or YouTube video URL to be displayed. The following code oEmbeds the video URL: <?php if ...
2
votes
1answer
1k views

How add class youtube and type/html to oembed code?

How can i add : class="youtube-player" type="text/html" to iframe like : function Oembed_youtube_no_title($html,$url,$args){ $url_string = parse_url($url, PHP_URL_QUERY); ...
1
vote
2answers
64 views

Use oEmbed in List Items

I'm aware that WordPress has oEmbed functionality. But the content to be embedded has to be on it's own line like so: Lorem Ipsum http://www.youtube.com/link/to/content More Lorem Ipsum ...