1. Home
  2. Wordpress
  3. Add head tag

Modify and add it to the function.php file. It allows to add tags to the head section of the site.

#wordpress#php
function theme_add_head_tag() {
     ?>
     <link rel="preload" href="assets/background.jpg" as="image">
     <?php
    }
 }

 add_action( 'wp_head', 'theme_add_head_tag' );
copy
Full Wordpress cheatsheet