Add Scripts to WP Header.php with Functions.php
Sometimes we need to add references to scripts, metatags or conditional styles to the WordPress <head></head> section in header.php. WordPress has an action hook for this purpose. It’s very easy to use. To add scripts, conditional styles or links to header.php, use the wp_head() action hook, like this: add_action(‘wp_head’, ‘function_name’); function function_name() { echo “\n”; … Read more