Sunday, May 8, 2011

How to modify size of embedded videos

Modify size of embedded videos in wordpress

 In WordPress, it is easy to embed videos on the blog. But sometimes, dealing with  the video sizes is a bit painful. Here is a solution how you can adjust the size of any embedded video using a filter in wordpress

 Just  paste the following code on the functions.php file.

 function custom_embed_defaults($embed_size){
    $embed_size['width'] = 650; // Adjust values to your needs
    $embed_size['height'] = 550;

    return $embed_size;

 add_filter('embed_defaults', 'custom_embed_defaults');

No comments:

Post a Comment

I just got my #domain @BigRock. Get upto 25% off with my personalized coupon link Get upto 25% off