Hello. I’m working on PageSpeed recommendations and one suggestion is to add a font load into the head. I’ve searched the forums and have tried the following code in my the Child Theme functions.php file:
add_action('wp_head', 'add_header_code');
function add_header_code(){
?>
<link rel=“preload” href=“appropriate url inserted here” as=“font”>
<?php
};
But once I clear cache and look at the page’s source code it is adding the information below the actual section, where the preload needs to be placed. Is there any clear way to add inside that specific section? I also tried using the Header/Footer plugin but it’s adding all of that content below the section.
Thank you for your assistance!
Sheila