For new users and students running WordPress sites, there are many options available to adding codes and scripts to WordPress header or footer sections of your sites.
When you want to add Google Analytics, Search Console verification code and other scripts, you’re told to add them either in the header or footer section of your website. To do that, you either have to manually edit your theme’s header.php or footer.php files or use built-in theme options or a plugin.
For new users and students, this can be intimidating.
The thing about manually editing your theme’s file is when you make a mistake, you render the site inoperable. Manually editing the theme’s file also make is difficult to manage, as you’ll always have to re-insert the codes everytime the theme is updated.
This can be time consuming.
Some WordPress themes offer a built-in option for quickly adding code and scripts to your WordPress header and footer file. Not all themes provide those features.
If you’re using a theme that has a built-in feature to add codes and scripts to your header or footer area, then you should use that. If you theme do not provide that options, then continue below.
This brief tutorial show students and new users how to use a plugin to add Analytics and other verification codes to your site’s header or footer section easily.
You only have to add the code once, and no need to re-insert everytime the theme is updated.
To get started, install Insert Headers and Footers plugin from WordPress plugins directory.
This is a simple plugin that lets you insert code like Google Analytics, custom CSS, Facebook Pixel, and more to your WordPress site header and footer. No need to edit your theme files!
To install plugins in WordPress, logon to the Admin dashboard and go to Plugins ==> Add New
Then search for the plugin you wish to install, then select and click Install Now
After installing, you’ll want to also click Activate to make the plugin usable on the site.
After installing and activating the plugins, go to Settings ==> Insert Headers and Footers
That should open the plugin page where you can add your custom codes to the header or footer or both areas of your site.
Then benefit of using this plugin, especially for students and new users is:
It lets you add codes to your site’s header and footer easily and quickly, and these can be organized without messing with your plugins files, thus preventing errors and mistakes.
The code and scripts you add using this plugin will stay in place even if your theme get updated. If you manually add the code to the theme files, all the changes will be erased when the theme is updated.
Hope you find it useful!
You may also like the post below: