Include Stylesheets the Safe Way Using WordPress

There are several ways you can include files in the header. One way is to add the this code:  <script src=”…”></script> to your header but the better way you can do it is to use the WordPress function:  wp_enqueue_script(). In this way, you can safely include stylesheets in your WordPress and prevent you from starting over again just because there are errors in the header file. You can safely isolate these scripts and prevent ruining your page because it loads scripts that are dependent on another WordPress script where in this case: JQuery. Moreover, you can make use of this technique for other functions.

 

Read how to do it here: http://www.cheesetoast.co.uk/safely-include-scripts-style-files-wordpress-header/

Leave a Reply

Your email address will not be published. Required fields are marked *

*