oEmbed in wordpress multisite not working
oEmbed in wordpress multisite not working
oEmbed in wordpress multisite not working
Have you considered using a simpler regex such as: ‘#^https?://padlet\.com/(\?.+)?$#’ Then breaking apart the latter section with explode to get the video ID?
The easiest way would be to take advantage of Embedly’s outstanding API. Add this code to your theme’s functions.php: // Add Myvideo oEmbed function add_oembed_myvideo(){ wp_oembed_add_provider( ‘http://www.myvideo.ge/*’, ‘http://api.embed.ly/v1/api/oembed’ ); } add_action(‘init’, ‘add_oembed_myvideo’); Embedly is free up to 5,000 “unique URLs per hour per month”. Unless you’re going wild with embeds on your site, you’ll probably … Read more
You didn’t give the URL. Please check if oEmbed url listed on the internal WordPress whitelist
Ok I managed to solve this! Did some digging through how the embed system works, and it turns out it wasn’t the use of wp_oembed_add_provider() that was wrong. Debugging autoembed_callback() in wp-includes\class-wp-embed.php showed that my YouTube URL was coming through but my Facebook URL never made it to this function. Echo’ing the post content before … Read more
Fixing the regex pattern To match an url of the type: https://coptic-treasures.com/ {Some string with a mix of a-z letters and hyphen}/{Some number}.html like this example: https://coptic-treasures.com/html-test-filed/02.html you can try this kind of pattern: ‘#https://coptic-treasures.com/([a-z-]+)/([0-9]+)\.html$#i’ and then you have to update the iframe output accordingly: … src=”https://coptic-treasures.com/%1$s/%2$s.html” … with the corresponding matches. Demo Here’s a … Read more
So apparently the issue also happens in WordPress 5.6 (the latest release as of writing), and YouTube is probably at fault because the (oEmbed) <link> tags are in the body instead of the head (see screenshot below), and that in turn causes the issue because WP_oEmbed::discover() looks for the <link> tags in the head only. … Read more
Not entirely sure it is supposed to be used like this, but by analogue with the_content try this: add_filter(‘the_excerpt’, array($wp_embed, ‘autoembed’), 9);
Pretty sure you can just remove them entirely: remove_action( ’embed_content_meta’, ‘print_embed_comments_button’ );
WordPress doesn’t add the frameborder attribute. YouTube does. It’s part of their embed code. If you absolutely must remove it you can use the embed_oembed_html filter to modify the returned HTML: function wpse_308247_remove_frameborder( $html, $url ) { // If the URL to be embedded is from YouTube. if ( strpos( $url, ‘youtube.com’ ) !== false … Read more