Adding Code Snippets to WP Head

When you need to add a scrip or other code snippet into the WordPress head, copy and paste this code within the Child Theme’s function.php file.

 

/* Describe what the code snippet does so you can remember later on */

add_action(‘wp_head’, ‘your_function_name‘);
function your_function_name(){
?>
PASTE HEADER CODE HERE
<?php
};

Leave a Reply