If you need to add your CSS or JS conditionally, the approach will vary. To include them in all files, you can utilize the functions.php page within your theme folder.
function add_custom_scripts() {
wp_register_script('custom_script', '/PATH/TO/YOUR/SCRIPT.js', false);
wp_enqueue_script('custom_script');
}
add_action('wp_enqueue_scripts', 'add_custom_scripts');
// This code ensures your script is properly enqueued at the right time.
For the stylesheet, follow these steps:
function add_custom_styles() {
wp_register_style('custom_styles', '/PATH/TO/YOUR/STYLESHEET.css');
wp_enqueue_style('custom_styles');
}
add_action('wp_enqueue_scripts', 'add_custom_styles');
// The same hook is used to enqueue CSS stylesheets.