Adding the wp_head function

Now another thing we want to put in the head is the wp_head function. Here, we can add any head content that we need, for example an extra style sheet for a WordPress plugin. So we will add <?php wp_head(); ?> as shown here:

  <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">  <?php wp_head(); ?></head>

We also want the character set. In the head, we will add <meta charset="<?php bloginfo(); ?>">. Then inside the parentheses, we'll add charset as shown here:

<title>PhotoGenik</title><meta charset="<?php bloginfo('charset'); ?>">

Now, we will make <h1> inside the header dynamic. We'll add <?php bloginfo(''); ?> and pass in name as shown here:

<body>  <header class="w3-container w3-teal"> <div class="w3-row"> ...

Get Learn to Create WordPress Themes by Building 5 Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.