Where Is the Head Tag in WordPress?

The head tag in WordPress is located inside the theme editor section. Specifically, the header.php file is where both your <head> and the <body> tags would be (in most cases).

How to Access the <head> Section in WordPress

Step 1: The first & foremost step is to navigate yourself to the theme editor. To get there:

  • Within your WordPress Dashboard, find the main “Appearance” menu/option.
  • Then, either click on it or hover your mouse over it (after your dashboard has completely loaded) to see its sub-menu items.
  • From the sub-items, one of those would be — as you guessed — theme editor.
accessing theme editor in wordpress
As demonstrated, the theme Editor lives under “Appearance.”

Step 2: Once you’re inside the theme editor, divert your attention to the right panel to the column of “Theme Files.”

theme files in wordpress
After you’re inside the Theme Editor, take a look at the theme files.

Step 3: Finally, from the theme files, select “header.php.”

header.php in wordpress
The header.php file contains the <head> section

A Few Must-Dos for Working With the header.php File

If you’re like me, you can’t wait to get started here. Put in all your scripts, codes, etc. and get on with things. Nevertheless, we must remind ourselves that back-end access and back-ups are our best friend.

If this your first time working with a header.php file, or not, a few things that I’d definitely recommend doing are:

  1. Ensure that you back-end access to your WP site. Either via an FTP software, through your domain registrar, or any other method. Just make sure you do. This will be beneficial in case you end up breaking your header.php file.
  2. Next, make sure you have back-up systems in place. Worst-case (and I do this regardless), copy-paste your entire (select-all) header.php code into a word document or a Google Document.
  3. Eventually, start making tweaks to your header.php — especially all the script insertions.

The way you’ll know a <head> section begins is by the presence of that tag inside the file, and similarly, the end by the presence of </head>. See the screenshot below for visual reference.

the opening and the ending head tag in wp header.php file
The opening and the ending head tag in wp header.php file.

You May Also Want to Check Out:


Locating the head section in WordPress isn’t as complicated as working with or rather, the fear of accidentally breaking the code.

However, as suggested, ensure you have back-end/FTP access to your site, and that you have enough backups and redundancies in place to restore the site as it were before in case it does break — not because it’s challenging — but because it’s a best practice.