Articles of embed

Google Map iframe in a tab issue

I have embedded a map on the third tab on a page. Page here > ‘Itinerary’ tab If you go straight to the tab while the page is still loading – it loads the map perfectly. However, if you wait until the page has fully loaded and then click on the tab ‘Itinerary’, the map […]

Applying class to links around self hosted images embedded to posts/pages

So I need to add a class to links around the images for lightbox purposes. But only to images from the upload directory, not to external ones. I’ve found this solution by @TommiForsstr√∂m here: function add_colorbox_class_to_image_links($html, $attachment_id, $attachment) { $linkptrn = “/<a[^>]*>/”; $found = preg_match($linkptrn, $html, $a_elem); // If no link, do nothing if($found <= […]

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.

Embed tag length issues

I have a pdf in my media library that I am trying to embed on a page. The width works fine but the length does not. I am trying to basically represent 8.5 x 11 on the screen. As it is only about 3-4 inches in screen length are shown and the rest is scroll […]

Video Embed with Captions in Turkish

I normally embed videos by directly writing the URL in the WP built in But now I want this video to open automatically with Turkish subtitles regardless of the user’s preferences. How to do that? I have tried adding these to URL, but none of them worked: &yt:cc=on &hl=tr &cc_lang_pref=tr &cc_load_policy=1 For example for TED […]

Is it possible to modify the default YouTube embed attributes string?

I’d like to suppress related YouTube videos by appending ‘&rel=0’ to the string of embed attributes output to the video iframe in my post. I believe this requires a filter that modifies the $attr array before it is passed to wp_embed_handler_youtube() (located in wp-includes/media.php). Assuming I’m on the right track, is there a way to […]

OEmbed from Pinterest

I’m looking for a way to show a certain pinterest pinboard in a post. I’ve found in the Documentation that you can simply post your pinboards URL there. This is not possible on a selfhosted WordPress installation so I guess that is something specific to What would be the easiest way to add […]

How to add new embed handler not supported by oembed?

I am looking to embed videos from websites that do not offer oembed support. I wrote some code but it’s not working. example link: example embed: <iframe src=”″ scrolling=”no” frameborder=”0″ width=”700″ height=”430″ allowfullscreen=”true” webkitallowfullscreen=”true” mozallowfullscreen=”true”></iframe> my code: add_action( ‘init’, function() { wp_embed_register_handler( ‘openload’, ‘#https://www\.openload\.co/f/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)?#i’, ‘wp_embed_handler_openload’ ); } ); function wp_embed_handler_openload( $matches, $attr, $url, $rawattr […]

How can I override print_embed_sharing_dialog() in WordPress 4.5

Is there a way to hook into print_embed_sharing_dialog() and modify its output without hacking the core? We -really- dislike the new HTML output and WordPress output options and want to display just one simple share link.

Customize Embedded Tweets (or, How To Hide Photos in Embedded Tweets)

I’m relying on the WP functionality to embed a tweet. When I add a tweet URL, like so: to the editor, it expands and shows the following: I never have to directly touch the embed code from Twitter. However, I’d like to customize the tweet so that it doesn’t display the image. According to […]