1. Home
  2. Wordpress
  3. Add head tag
#wordpress#php

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

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
Sitemap Git repository