How to add custom CSS/JS to just one page in WordPress?

Posted by Pinki | Updated on

Want to add custom CSS/JS to just one page in WordPress? When you will add the page from the WordPress back end, using Pages->Add new from the menu, you have to give a title and using that title (also possible using slug and id) you can check is_page(‘page title here’) and then can add JavaScript and css files, like

Use the below snippet in your activated theme’s functions.php file.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers