How to add code to head tag in wordpress ?

0
5943
How to add code to head tag in wordpress ?
How to add code to head tag in wordpress ?

This article will teach you – How to add code to head tag in wordpress ? You may be interested in this article: Setup Adsense auto ads WordPress: Easy steps + Video tutorial

The article provides steps and video tutorial on How to add code to head tag in wordpress ?

Open your WordPress Website Dashboard

or login not already – you can login to wordpress by placing /wp-login.php behind your website url.

Example: mrvirk.com/blog/wp-login.php

Now, we need to Edit – header.php file. Follow the steps below to find your header.php file.

1- Dashboard

2- Hover over – Appearance

3- Click Editor.

wordpress

4- Now an Editor Opens – Listing Several files

5- Find and Choose header.php file
or skip steps 1 to 5 and instead place /wp-admin/theme-editor.php?file=header.php behind your domain/website url, this url will open header.php file in editor

Example: mrvirk.com/blog/wp-admin/theme-editor.php?file=header.php

Towards the top of the file you will see <head> tags

Example:

add code head tag
Head Tag

<head> (opening tag)

some lines of code

</head> (closing tag)

Add your code just above the closing head tag.

Save/Update the file.
(Don’t forget to save as the changes will be lost. Since, the change are not autosaved).
This method can be used to add – Google analytics, Google Webmasters, Yahoo Dot Tag,To enable Adsense Page level Ads, Facebook Pixel, or any other script code to your wordpress website.

You may also be interested in this article:

Godaddy cpanel Walkthrough

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.