How to Add Code to Head Tag in Wordpress ? Step by Step

Опубликовано: 05 Июнь 2018
на канале: Mr. Virk Media
87,271
664

Learn How to add code to head tag in wordpress ?
Full Article with steps: https://mrvirk.com/how-to-add-code-to...
Video Summary: This tutorial teaches you – How to add code to head tag in wordpress ?
Note: If you cant find the editor refer to the last section of the page

Step by Step Guide on How to Edit 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/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.
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

Towards the top of the file you will see head tags

Add your code just above the closing head tag.

Save/Update the file.

---------
Use Cases for Adding Code to WordPress Head
Most common uses cases are adding a tracking pixels like Google analytics code, Google Webmasters, Yahoo Dot Tag, or to enable Adsense Page level Ads, Facebook Pixel code, or Javascript code.

The solution in this article works for all the above use cases.
---------
Important Note: If you cant find the Editor, you may happen to be using wordpress .com instead of self hosted wordpress site (via wordpress .org).
Unfortunately, wordpress .com doesn't allow people to access theme editor or make changes to theme files on the free plan.

Wordpress .com which is for profit organisation, on their free account users don't have much control of the admin panel.

In your situation you will need to use a plugin to achieve adding code to your site but that will also require upgrading the plan. Going forward we recommend you using Wordpress .org which is the self hosted version of wordpress and provides the user full control and for free with no strings attached.

Wordpress .org vs Wordpress .com - https://mrvirk.com/wordpress-com-vs-w...

Here is another thread on the topic: https://en.forums.wordpress.com/topic...

--------
Tags content also relevant for: add code to wordpress header, how to add adsense code in wordpress header, how to add code to header in wordpress, how to add adsense code in wordpress header