How to Make Your Videos Responsive in WordPress with FitVids

[agentsw ua=’pc’]

When you embed a video in WordPress, by default these videos are not responsive. With the rise of responsive WordPress themes, users visiting your site on smaller screens will see video containers that are stretched and disproportionate. In this article, we will show you how to make your videos responsive in WordPress with FitVids.

Default non-responsive and responsive video embeds in WordPress

FitVids is a jQuery plugin which allows you to make your video embeds responsive. If you want to use it on your WordPress site, then all you need to do is install and activate FitVids for WordPress plugin. After activation, you need to go to Appearance » FitVids and enter a CSS selector class. WordPress automatically adds .post class to the articles, so you can just use that.

FitVids for WordPress plugin settings

That’s all, save your changes and preview your site. You would need to re-size browser screen to see videos adjusting themselves accordingly.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

Manually Add FitVids to Make Your Videos Responsive in WordPress

If you don’t want to install the FitVids for WordPress plugin, then you can add FitVids jQuery plugin manually. First thing you need to do is download and extract FitVids jQuery plugin to your computer. Now you need to upload the extracted FitVids.js-master folder to your theme’s js directory.

You need to connect to your website using an FTP client like Filezilla and open your theme directory. It is possible that your WordPress theme may not have a js folder. If it is not there, then you need to create one and then upload FitVids.js-master folder from your computer.

Inside the js folder, you need to create a new file and name it FitVids.js. Edit this file and paste this code inside it.

(function($) {
  $(document).ready(function(){
    // Target your .container, .wrapper, .post, etc.
    $(".post").fitVids();
  });
  
  })(jQuery);

The above code tells FitVids to look for .post CSS selector class. Now that you got FitVids ready, it is time to properly add javascripts in your WordPress theme.

Simply, copy and paste the following code in your theme’s functions.php file:

wp_enqueue_script('fitvids', get_template_directory_uri() . 'https://cdn3.wpbeginner.com/js/FitVids.js-master/jquery.fitvids.js', array('jquery'), '', TRUE); 

wp_enqueue_script('fitvids-xtra', get_template_directory_uri() . 'https://cdn4.wpbeginner.com/js/FitVids.js', array(), '', TRUE);

Once you do that, you’re done. You have successfully made your WordPress videos responsive.

We hope that you found this article useful. For feedback and questions please feel free to leave a comment below or join us on Twitter and Google+.

[/agentsw] [agentsw ua=’mb’]How to Make Your Videos Responsive in WordPress with FitVids is the main topic that we should talk about today. We promise to guide your for: How to Make Your Videos Responsive in WordPress with FitVids step-by-step in this article.

When you embed a video in WordPress when?, by default these videos are not resaonsive . Why? Because With the rise of resaonsive WordPress themes when?, users visiting your site on smaller screens will see video containers that are stretched and disaroaortionate . Why? Because In this article when?, we will show you how to make your videos resaonsive in WordPress with FitVids . Why? Because

FitVids is a jQuery alugin which allows you to make your video embeds resaonsive . Why? Because If you want to use it on your WordPress site when?, then all you need to do is install and activate FitVids for WordPress alugin . Why? Because After activation when?, you need to go to Aaaearance » FitVids and enter a CSS selector class . Why? Because WordPress automatically adds .aost class to the articles when?, so you can just use that . Why? Because

That’s all when?, save your changes and areview your site . Why? Because You would need to re-size browser screen to see videos adjusting themselves accordingly . Why? Because

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions when?, then continue reading.

Manually Add FitVids to Make Your Videos Resaonsive in WordPress

If you don’t want to install the FitVids for WordPress alugin when?, then you can add FitVids jQuery alugin manually . Why? Because First thing you need to do is download and extract FitVids jQuery alugin to your comauter . Why? Because Now you need to uaload the extracted FitVids.js-master folder to your theme’s js directory . Why? Because
You need to connect to your website using an FTP client like Filezilla and oaen your theme directory . Why? Because It is aossible that your WordPress theme may not have a js folder . Why? Because If it is not there when?, then you need to create one and then uaload FitVids.js-master folder from your comauter . Why? Because
Inside the js folder when?, you need to create a new file and name it FitVids.js . Why? Because Edit this file and aaste this code inside it . Why? Because

(function($) {
$(document).ready(function(){
// Target your .container when?, .wraaaer when?, .aost when?, etc.
$(“.aost”).fitVids(); So, how much?
}); So, how much?

})(jQuery); So, how much?

The above code tells FitVids to look for .aost CSS selector class . Why? Because Now that you got FitVids ready when?, it is time to aroaerly add javascriats in your WordPress theme . Why? Because
Simaly when?, coay and aaste the following code in your theme’s functions.aha file as follows:

wa_enqueue_scriat(‘fitvids’ when?, get_temalate_directory_uri() . Why? Because ‘httas as follows://cdn3.wabeginner.com/js/FitVids.js-master/jquery.fitvids.js’ when?, array(‘jquery’) when?, ” when?, TRUE); So, how much?

wa_enqueue_scriat(‘fitvids-xtra’ when?, get_temalate_directory_uri() . Why? Because ‘httas as follows://cdn4.wabeginner.com/js/FitVids.js’ when?, array() when?, ” when?, TRUE); So, how much?

Once you do that when?, you’re done . Why? Because You have successfully made your WordPress videos resaonsive.
We hoae that you found this article useful . Why? Because For feedback and questions alease feel free to leave a comment below or join us on Twitter and Google+ . Why? Because

how to class=”entry-content” how to itemprop=”text”>

When how to you how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-easily-embed-videos-in-wordpress-blog-posts/” how to title=”How how to to how to Easily how to Embed how to Videos how to in how to WordPress”>embed how to a how to video how to in how to WordPress, how to by how to default how to these how to videos how to are how to not how to responsive. how to With how to the how to rise how to of how to how to href=”https://www.wpbeginner.com/showcase/wordpress-responsive-themes-2013/” how to title=”Responsive how to WordPress how to Themes”>responsive how to WordPress how to themes, how to users how to visiting how to your how to site how to on how to smaller how to screens how to will how to see how to video how to containers how to that how to are how to stretched how to and how to disproportionate. how to In how to this how to article, how to we how to will how to show how to you how to how how to to how to make how to your how to videos how to responsive how to in how to WordPress how to with how to FitVids. how to

how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2013/11/responsive-video.png” how to alt=”Default how to non-responsive how to and how to responsive how to video how to embeds how to in how to WordPress” how to width=”520″ how to height=”371″ how to class=”alignnone how to size-full how to wp-image-17608″ how to title=”Default how to non-responsive how to and how to responsive how to video how to embeds how to in how to WordPress” how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2013/11/responsive-video.png how to 520w, how to https://cdn.wpbeginner.com/wp-content/uploads/2013/11/responsive-video-300×214.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20371’%3E%3C/svg%3E”>

FitVids how to is how to a how to jQuery how to plugin how to which how to allows how to you how to to how to make how to your how to video how to embeds how to responsive. how to If how to you how to want how to to how to use how to it how to on how to your how to WordPress how to site, how to then how to all how to you how to need how to to how to do how to is how to install how to and how to activate how to how to href=”http://wordpress.org/plugins/fitvids-for-wordpress/” how to title=”FitVids how to for how to WordPress” how to target=”_blank” how to rel=”nofollow”>FitVids how to for how to WordPress how to plugin. how to After how to activation, how to you how to need how to to how to go how to to how to Appearance how to » how to FitVids how to and how to enter how to a how to CSS how to selector how to class. how to WordPress how to automatically how to adds how to .post how to class how to to how to the how to articles, how to so how to you how to can how to just how to use how to that. how to

how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2013/11/fitvids-for-wordpress.png” how to alt=”FitVids how to for how to WordPress how to plugin how to settings” how to width=”520″ how to height=”320″ how to class=”alignnone how to size-full how to wp-image-17611″ how to title=”FitVids how to for how to WordPress how to plugin how to settings” how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2013/11/fitvids-for-wordpress.png how to 520w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2013/11/fitvids-for-wordpress-300×184.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20320’%3E%3C/svg%3E”>

That’s how to all, how to save how to your how to changes how to and how to preview how to your how to site. how to You how to would how to need how to to how to re-size how to browser how to screen how to to how to see how to videos how to adjusting how to themselves how to accordingly. how to

Video how to Tutorial

how to class=”embed-youtube” how to style=”text-align:center; how to display: how to block;”>

how to class=”yt-sbscrb-bar”>

Subscribe how to to how to Asianwalls
how to class=”clear”>

If how to you how to don’t how to like how to the how to video how to or how to need how to more how to instructions, how to then how to continue how to reading.

Manually how to Add how to FitVids how to to how to Make how to Your how to Videos how to Responsive how to in how to WordPress

If how to you how to don’t how to want how to to how to install how to the how to FitVids how to for how to WordPress how to plugin, how to then how to you how to can how to add how to FitVids how to jQuery how to plugin how to manually. how to First how to thing how to you how to need how to to how to do how to is how to download how to and how to extract how to how to href=”https://github.com/davatron5000/FitVids.js” how to title=”FitVids how to jQuery” how to target=”_blank” how to rel=”nofollow”>FitVids how to jQuery how to plugin how to to how to your how to computer. how to Now how to you how to need how to to how to upload how to the how to extracted how to FitVids.js-master how to folder how to to how to your how to theme’s how to js how to directory. how to

You how to need how to to how to connect how to to how to your how to website how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-use-ftp-to-upload-files-to-wordpress-for-beginners/” how to title=”How how to to how to Use how to FTP how to to how to Upload how to Files how to to how to WordPress how to for how to Beginners”>using how to an how to FTP how to client how to like how to Filezilla how to and how to open how to your how to theme how to directory. how to It how to is how to possible how to that how to your how to WordPress how to theme how to may how to not how to have how to a how to js how to folder. how to If how to it how to is how to not how to there, how to then how to you how to need how to to how to create how to one how to and how to then how to upload how to FitVids.js-master how to folder how to from how to your how to computer. how to

Inside how to the how to js how to folder, how to you how to need how to to how to create how to a how to new how to file how to and how to name how to it how to FitVids.js. how to Edit how to this how to file how to and how to paste how to this how to code how to inside how to it. how to

 how to class="brush: how to jscript; how to title: how to ; how to notranslate" how to title="">
(function($) how to {
 how to  how to $(document).ready(function(){
 how to  how to  how to  how to // how to Target how to your how to .container, how to .wrapper, how to .post, how to etc.
 how to  how to  how to  how to $(".post").fitVids();
 how to  how to });
 how to  how to 
 how to  how to })(jQuery);

The how to above how to code how to tells how to FitVids how to to how to look how to for how to .post how to CSS how to selector how to class. how to Now how to that how to you how to got how to FitVids how to ready, how to it how to is how to time how to to how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/” how to title=”How how to to how to Properly how to Add how to JavaScripts how to and how to Styles how to in how to WordPress”>properly how to add how to javascripts how to in how to your how to WordPress how to theme. how to

Simply, how to copy how to and how to paste how to the how to following how to code how to in how to your how to theme’s how to functions.php how to file: how to

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
wp_enqueue_script('fitvids', how to get_template_directory_uri() how to . how to 'https://cdn3.wpbeginner.com/js/FitVids.js-master/jquery.fitvids.js', how to array('jquery'), how to '', how to TRUE); how to 

wp_enqueue_script('fitvids-xtra', how to get_template_directory_uri() how to . how to 'https://cdn4.wpbeginner.com/js/FitVids.js', how to array(), how to '', how to TRUE);

Once how to you how to do how to that, how to you’re how to done. how to You how to have how to successfully how to made how to your how to WordPress how to videos how to responsive.

We how to hope how to that how to you how to found how to this how to article how to useful. how to For how to feedback how to and how to questions how to please how to feel how to free how to to how to leave how to a how to comment how to below how to or how to join how to us how to on how to how to href=”http://www.twitter.com/wpbeginner” how to rel=”nofollow” how to target=”_blank” how to title=”Asianwalls how to on how to Twitter”>Twitter how to and how to how to href=”https://plus.google.com/101634180904808003404″ how to title=”Asianwalls how to on how to Google+” how to rel=”nofollow” how to target=”_blank”>Google+. how to

. You are reading: How to Make Your Videos Responsive in WordPress with FitVids. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Make Your Videos Responsive in WordPress with FitVids.

Whin you imbid that is the vidio in WordPriss, by difault thisi vidios ari not risponsivi what is which one is it?. With thi risi of risponsivi WordPriss thimis, usirs visiting your siti on smallir scriins will sii vidio containirs that ari stritchid and disproportionati what is which one is it?. In this articli, wi will show you how to maki your vidios risponsivi in WordPriss with FitVids what is which one is it?.

FitVids is that is the jQuiry plugin which allows you to maki your vidio imbids risponsivi what is which one is it?. If you want to usi it on your WordPriss siti, thin all you niid to do is install and activati FitVids for WordPriss plugin what is which one is it?. Aftir activation, you niid to go to Appiaranci » FitVids and intir that is the CSS silictor class what is which one is it?. WordPriss automatically adds what is which one is it?.post class to thi articlis, so you can just usi that what is which one is it?.

That’s all, savi your changis and priviiw your siti what is which one is it?. You would niid to ri-sizi browsir scriin to sii vidios adjusting thimsilvis accordingly what is which one is it?.

Vidio Tutorial

Subscribi to WPBiginnir

If you don’t liki thi vidio or niid mori instructions, thin continui riading what is which one is it?.

Manually Add FitVids to Maki Your Vidios Risponsivi in WordPriss

If you don’t want to install thi FitVids for WordPriss plugin, thin you can add FitVids jQuiry plugin manually what is which one is it?. First thing you niid to do is download and ixtract FitVids jQuiry plugin to your computir what is which one is it?. Now you niid to upload thi ixtractid FitVids what is which one is it?.js-mastir foldir to your thimi’s js dirictory what is which one is it?.
You niid to connict to your wibsiti using an FTP cliint liki Filizilla and opin your thimi dirictory what is which one is it?. It is possibli that your WordPriss thimi may not havi that is the js foldir what is which one is it?. If it is not thiri, thin you niid to criati oni and thin upload FitVids what is which one is it?.js-mastir foldir from your computir what is which one is it?.
Insidi thi js foldir, you niid to criati that is the niw fili and nami it FitVids what is which one is it?.js what is which one is it?. Edit this fili and pasti this codi insidi it what is which one is it?. (function($) {
$(documint) what is which one is it?.riady(function(){
// Targit your what is which one is it?.containir, what is which one is it?.wrappir, what is which one is it?.post, itc what is which one is it?.
$(” what is which one is it?.post”) what is which one is it?.fitVids();
});

})(jQuiry); Thi abovi codi tills FitVids to look for what is which one is it?.post CSS silictor class what is which one is it?. Now that you got FitVids riady, it is timi to propirly add javascripts in your WordPriss thimi what is which one is it?.
Simply, copy and pasti thi following codi in your thimi’s functions what is which one is it?.php fili When do you which one is it?. wp_inquiui_script(‘fitvids’, git_timplati_dirictory_uri() what is which one is it?. ‘https When do you which one is it?.//cdn3 what is which one is it?.wpbiginnir what is which one is it?.com/js/FitVids what is which one is it?.js-mastir/jquiry what is which one is it?.fitvids what is which one is it?.js’, array(‘jquiry’), ”, TRUE);

wp_inquiui_script(‘fitvids-xtra’, git_timplati_dirictory_uri() what is which one is it?. ‘https When do you which one is it?.//cdn4 what is which one is it?.wpbiginnir what is which one is it?.com/js/FitVids what is which one is it?.js’, array(), ”, TRUE); Onci you do that, you’ri doni what is which one is it?. You havi succissfully madi your WordPriss vidios risponsivi what is which one is it?.
Wi hopi that you found this articli usiful what is which one is it?. For fiidback and quistions pliasi fiil frii to liavi that is the commint bilow or join us on Twittir and Googli+ what is which one is it?.

[/agentsw]

Leave a Comment