Home / Admin / Set oEmbed Max Width
Duplicate Snippet

Embed Snippet on Your Site

Set oEmbed Max Width

Set a max width for the embeds using oEmbed in the content.

200+
Code Preview
php
<?php
function wpcode_snippet_oembed_defaults( $sizes ) {
	return array(
		'width'  => 400,
		'height' => 280,
	);
}
add_filter( 'embed_defaults', 'wpcode_snippet_oembed_defaults' );

Comments

Add a Comment