You are here: Home » Website Design » Best way to Include Custom CSS and Javascript files in WordPress Themes and Plugins

Best way to Include Custom CSS and Javascript files in WordPress Themes and Plugins

Knowing the best way to Include Custom CSS and JavaScript files in WordPress Themes and Plugins is very important for WordPress Developer and Designer. This is very important to easy way to include custom files in WordPress theme and Plugin.

If you’ve ever developed a theme or plugin for WordPress, or worked with one that someone else has created, you’ve probably come several different ways for including JavaScript and CSS. While there are several methods that may appear to work in a specific set of circumstances, there is one primary method recommended in the WordPress Codex. This preferred way will ensure your theme or plugin works in all cases, assuming others also code the correct way.

There is a function is Used to add files in WordPress. wp_register_script

This is an example of code which are used to add Custom files in WordPress themes,
Just copy this code on your theme and plugin main file like function file.

Umakant Sonwani is the Founder and Owner of the WP Tutorials Point. He is very Passionate, Geek and Loves Technology and WordPress Development.

http://www.wptutorialspoint.com/