ARTICLE AD BOX
I’m building a custom WordPress theme and currently adding CSS and JS directly in header.php.
I read that wp_enqueue_style and wp_enqueue_script should be used instead.
Can someone explain the correct way to enqueue files and why it’s preferred?
New contributor
Shubha Rawat is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Sorted by: Reset to default
Your Answer
Post as a guest
Name
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
