How to Add Specific CSS and JS to Specific Pages

Prem Tiwari - - WordPress Snippets

Hello friends, this is very quick and short tutorial about WordPress trick to adding specific stylesheet and JavaScript to specific pages in WordPress. Are you a WordPress Theme developer OR a WordPress Plugin developer, then keep your close attention in this post as I am going to share how to add specific CSS and JS to specific pages in WordPress.

How to add specific stylesheet and javascript to specific pages

Open the functions.php file from your current activated WordPress themes folder and copy paste below code at the end of the file and save it. Below code will add the stylesheet and javascript files only in the “your-template.php” page.

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.