wp_embed_register_handler is not working

You are trying to match the r2jeim68kuq6.html part, but you’re not allowing dots in your regex pattern here: ‘#https://vidoza\.net/([a-zA-Z0-9_-]+)$#i’ You can try e.g. (removing the A-Z too because of the case-insensitive i search): ‘#https://vidoza\.net/([a-z0-9_-]+)\.html$#i’ if .html is a standard extension and where you also adjust the iframe source to: src=”https://vidoza.net/embed-%1$s.html” Hope it helps!

how to embed external webpage in my wordpress page

You could simply iframe the content into your pages? <iframe src=”http://www.w3schools.com”></iframe> Some more info on iframe params are here: http://www.w3schools.com/tags/tag_iframe.asp Otherwise a nicer alternative might be to show the external pages via a modal window (which is still essentially an iframe). You could try Fancybox (http://fancyapps.com/fancybox/#examples), there are iframe examples and code on the page, … Read more

How to change WordPress embedded player size or show just the play button

I assume you’re talking about embedding audio files, like: The audio embed handler is registered within wp_maybe_load_embeds() and filtered through the wp_embed_handler_audio filter. So within WP_Embed::shortcode() this generates to: so some of the methods mentioned here for the shortcode should work. Since we are using the Output: Play button: Pause button: Tested on the Twenty … Read more

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

Here’s one way using the oembed_fetch_url filter to add the hide_media query parameter, that’s also mentioned in the Twitter doc page you linked to: Set an oEmbed query parameter of hide_media=true or add a data-cards=”hidden” attribute to the resulting <blockquote> element to prevent expanded content display. Here’s an example: /** * Hide media for all … Read more

Youtube – Embed as IFRAME

If you don’t want to utilize the latest oembed functions and want the old iframe way from any page or post, you can do these: Get the embed code from any youtube video. While editing/creating your post/page, select the Text(HTML) mode of the editor Simply paste the embed code As noted by PayteR, this will … Read more

How to add new embed handler not supported by oembed

Registering a custom embed handler Here’s an example how we can use the wp_embed_register_handler() function in your case: /** * Register an embed handler for myvi videos */ add_action( ‘init’, function() { wp_embed_register_handler( ‘myvi’, ‘#http://www\.myvi\.ru/watch/([a-zA-Z0-9_-]+)$#i’, // <– Adjust this to your needs! ‘myvi_embed_handler’ ); } ); Here we constructed the regular expression in a way … Read more

wp_embed_register_handler not working

I modified the example you posted from the Codex: /** * Embed support for Forbes videos * * Usage Example: * * http://www.forbes.com/video/5049647995001/ */ add_action( ‘init’, function() { wp_embed_register_handler( ‘forbes’, ‘#http://www\.forbes\.com/video/([\d]+)/?#i’, ‘wp_embed_handler_forbes’ ); } ); function wp_embed_handler_forbes( $matches, $attr, $url, $rawattr ) { $embed = sprintf( ‘<iframe class=”forbes-video” src=”https://players.brightcove.net/2097119709001/598f142b-5fda-4057-8ece-b03c43222b3f_default/index.html?videoId=%1$s” width=”600″ height=”400″ frameborder=”0″ scrolling=”no”></iframe>’, esc_attr( $matches[1] … Read more