This topic has 2 replies, 2 voices, and was last updated 6 years, 10 months ago ago by Rose Tyler
Hi,
How do I add a custom CSS and JS file to a page in Royal theme?
Thanks,
James
Hello,
Custom css code you may add via Theme Options or custom.css file of parent theme or style.css file of a child theme. Also, you can add css code in Custom css for page http://prntscr.com/hzdnwe
To include JS you need to create etheme-child.js file in your child theme –
jQuery(document).ready(function() {
your js code
});
to check for what page to use this code you may add one more checking for needed page by page individual class http://prntscr.com/hzdqc8 with page id or if it is home page or any page that has not a copy you can also check like this http://prntscr.com/hzdqxd ( for example,
if ($('body').hasClass('home')) { your js code }
)
Regards
You must be logged in to reply to this topic.Log in/Sign up