How To Include CSS & JavaScript in WordPress Theme with WP Register & Enqueue Script & Style

preview_player
Показать описание
In this video, I’m going to show you how to properly register and enqueue JavaScript and CSS files in WordPress Theme.
The method I’m going to demonstrate in this Learn WordPress Development Tutorial is going to ensure that your WordPress Themes are 100% compatible with every website and all plugins that are used on the site.

I demonstrate this process with the DevWP WordPress Development Training Theme:

I will show you the best practices and also show you what not to do. As a WordPress Theme Developer, it’s important that you make your themes compatible and portable.
It’s also important to make sure your themes are optimized and perform well by only using the resources required on each particular page or post.
I also show you all the functions you would use and how to load a file from a CDN or properly register and enqueue styles and scripts from a WordPress Child Theme.
If you want to become a WordPress Developer, then check out all my videos which guide you on how to develop and code for WordPress.
Рекомендации по теме
Комментарии
Автор

I predict, that your videos will become extremely popular as times goes by! Thank you!

ivanizmir
Автор

I plan to use this info in conjunction with a waypoint js script that will only load on the front page. Thanks dude! I appreciate the excellent tut.

ScottFichter
Автор

Hello sir, I want to learn wp coding so from which of your video should i start. I understand wp but i want to learn coding, i know basic PHP. Please send me link. Thank you from your new follower😜

Earn_ladies
Автор

Can you extend a theme? I want to use my CSS/JS on a theme without it being wiped out every time the theme is updated. I assume functions.php is reinstalled with each new version of the theme; practically everything else is.

teamsiems
Автор

What's array( 'jquery' ), do when enqueue scripts? Is it similar to array( ), except its only using jquery dependencies?

ScottFichter
Автор

When I try to use jquery in my wordpress theme I get a error in the console that says $ is not a function, pointing to where the first instance of using jquery's $. And I cant seem to fix it. I dont know what else to do to make it work. In functions.php I have it just like this with array('jquery') and everything. So idk why I am getting this error.

jameshagood