Questions tagged [oembed]

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

51 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
376 views

static variable loop not working in Wordpress

I have a function in my wordpress theme that deletes the first embedded video in a video post. See code below. This is in the functions.php file. /* - function that hides first video in post content -...
2
votes
0answers
1k 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 class="entry-...
2
votes
0answers
662 views

wp_insert_post iframe missing

In my install, I use 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 use the following code $my_post = ...
2
votes
1answer
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 - ...
2
votes
1answer
76 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 ...
1
vote
0answers
12 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&...
1
vote
0answers
19 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. ...
1
vote
1answer
62 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 ...
1
vote
0answers
38 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 ...
1
vote
0answers
59 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 ...
1
vote
1answer
265 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 ...
1
vote
1answer
83 views

Why is my oembed function modifying Twitter embed?

Building a theme with Boostrap 4 and WordPress 5.0.1. Under Bootstrap's documentation for embed video the following format is required for responsive videos: <div class="embed-responsive embed-...
1
vote
0answers
14 views

How to change the oembed “type”?

By default the oEmbed type of my wordpress posts is "rich", but I want to convert it to "Video". I spent 2+ hours trying to find the answer but with no luck, is it possible?
1
vote
0answers
744 views

oEmbed not working in WordPress

I am using custom embed URL for embedding a video. Embedding Youtube and Vimeo working really fine. But only this URL is not working. But if I add via iframeit is working. But I need to add this via ...
1
vote
1answer
346 views

Problem with oEmbed in some themes

I registered my oembed provider, in my wp cms (provider is not whitelisted in WP community). But I have problems with this oembed url. Mentioned oembed url is working in some themes, and in other I ...
1
vote
1answer
92 views

JSON in oembed not being internationalized (using QTranslateX)

I'm using the QTranslateX plugin at its latest version, 3.4.6.8, in a fresh WordPress 4.7.1 installation. At the moment everything is working OK. But I've seen that in JSON-oembed pages there's some ...
1
vote
0answers
555 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 ...
1
vote
0answers
118 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 a ...
0
votes
0answers
34 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 ...
0
votes
0answers
31 views

Oembed support for private Google Drive previews

I have a wordpress intranet for my company where I want to insert previews (i.e. iframes) of some of the company's private PDF files that are stored in Google Drive. So I don't want those files to be ...
0
votes
0answers
5 views

How do I pull out an embed out of a post's content?

I wanna pull out an embed (its output) from a post. Here's what I've tried so far: Go through the post. Find any links by any regex. Look in an array to see if that link's baseline youtube is ...
0
votes
1answer
48 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' ); ...
0
votes
0answers
777 views

How to modify the HTML output of Gutenberg block? (Youtube)

I'm using a headless Wordpress linked to a Nuxt projet and I like to modify the output of my Gutenblock when it's called from the REST API. Current ouput is : <!-- wp:core-embed/youtube {"url":"...
0
votes
0answers
110 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 ...
0
votes
0answers
16 views

Is there a way to late trigger oembeds?

Sometimes, with the theme I am working on creating, the posts that are only oembed do not display and I have to refresh the page to see them. I assume that there is a function that triggers to make ...
0
votes
0answers
13 views

The output of wp_oembed_get appears to ignore local blog URLs

The output of wp_oembed_get appears to ignore local blog URLs - why is this? If I set some var, say, $mylink which contains the URL to a post on my blog. Then I call wp_oembed_get($mylink) it ...
0
votes
0answers
63 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 ...
0
votes
0answers
23 views

Is the return value of wp_oembed_get() a valid block?

In the answer to "How does WP detect format type (and can I make use of this)?" a method is given for detecting block type. If I passed in the result of, say, $out = wp_oembed_get($href); would that ...
0
votes
0answers
37 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 ...
0
votes
0answers
64 views

Use get_media_embedded_in_content to get Youtube links not in their own line

I am currently using the blow code: $media = get_media_embedded_in_content( apply_filters( 'the_content', get_the_content() ) ); echo $media[0]; This is getting any YouTube link someone posts ...
0
votes
0answers
564 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 ...
0
votes
0answers
118 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 ...
0
votes
1answer
205 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 ...
0
votes
2answers
4k views

Advanced Custom Fields oembed only outputs YouTube URL

Having the exact same problem as @Hjalmar on Advanced Custom Fields, but still no fix. Only the URL text displays. Tried the original ACF oembed option: <div class="embed-container"> <?...
0
votes
0answers
65 views

Modify oembed code conditionally

My users have sprung a requirement on me that I am having some difficulty figuring out. I've tied myself up in knots trying to unravel the the logic needed. The original spec of this website I am ...
0
votes
1answer
152 views

Load oEmbed iframe within ajax call

I'm trying to load oembed shortcode loaded via ajax. The problem is that the oembed shortcode seems to work as I have a blockquote instead of the instagram link. However the blockquote is not ...
0
votes
0answers
190 views

Keep excerpt from stripping URLs and enable autoembed for youtube ONLY?

Is there an easy way to drop something into functions? I tried removing all filters from the_excerpt and the URLs are still being stripped (not links, but just straight URLs). I've scoured the ...
0
votes
0answers
184 views

oembed facebook link?

I'm trying to oembed some facebook video . . . without ay chance so far . .. I'd like to avoid any plugin for this. I went through toe documentation but nothing to do, I'm declaring in my functions....
0
votes
0answers
414 views

Why doesn't wp_oembed_get() for the video post format not work?

I have this code: <?php if ( has_post_format ('video') ) { ?> <div class="video-head"> <?php $video = get_post_meta( $post->ID, '_format_video_embed', true ); ...
0
votes
0answers
411 views

How to Hide Ancestors/Threads in Embedded Tweets

I'd like my embedded tweets to not show a parent/ancestor, for example this is how Wordpress oEmbed displays a single tweet I'd prefer all to look like: I tried this approach to filter on ...
0
votes
1answer
36 views

Remove link function from oembed image or video

I would like to include oembed video on my site, but I would like to disable the link back to the original site. Is this possible? Thank you!
0
votes
1answer
429 views

Wordpress Mediaelement - Youtube Videos Embed Options

I have a custom field where I define the Youtube Url as a string. https://www.youtube.com/watch?v=3VqHtEF3LPE This then becomes the src in my theme's shortcode: <?php $ysrc = get_field('...
0
votes
1answer
77 views

Use oEmbed for static html

I am trying to add a jQuery plugin (https://github.com/rmanivannan/speedometer-jquery-plugin) to a Wordpress page (not post), however the plugin is not behaving as expected. I think this may have ...
0
votes
1answer
2k views

class-oembed Error

PHP Fatal error: Cannot redeclare _wp_oembed_get_object() (previously declared in /home/samdonme/public_html/wp-includes/embed.php:112) in /home/samdonme/public_html/wp-includes/class-oembed.php on ...
0
votes
1answer
182 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
0answers
141 views

Adding an official oEmbed provider to Wordpress

How can I add an official oEmbed provider to this list: https://codex.wordpress.org/Embeds ?
0
votes
1answer
691 views

oEmbed Video in Modal

I'm attempting to use jQuery to open up a video in a modal but can't come up with a way to pass the oEmbed video url to the function which opens the modal. In my theme the user adds the video to an ...
0
votes
1answer
64 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 ...
0
votes
1answer
474 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
0answers
203 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 ...