How to Use Script and Styles in WordPress

Prem Tiwari - - WordPress Snippets

If you are a WordPress Theme OR Plugin developer and want to add your JS and CSS file to your site header area, then keep your close attention in this tutorial as I am going to share how to use script and styles in WordPress.

You can register your scripts and styles by using the wp_register_script() function. See the examples below:

How to Use Script and Styles in WordPress

Use the below code to add your JS file in WordPress site.

Use bellow function for add styles file on WordPress site.

If you want to add custom JavaScript code, use below code (But is bad)

Prem Tiwari

Prem Tiwari is the founder of and also a professional developer and a blogger by hobby.

Tags: , , , , , , ,

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.