ブログやサイトの全てのページのヘッダーやフッターにコードを挿入するのは、プラグインで簡単に実現できます。
ここでは「Head, Footer and Post Injections」プラグインを紹介いたします。
Head, Footer and Post Injectionsプラグインのインストール
(1)WordPressのダッシュボードから「プラグイン」をクリックし、「新規プラグインを追加」をクリックします。

(2)①に「Head, Footer and Post Injections」を入力すると、「Head, Footer and Post Injections」プラグインが表示されるので②の「今すぐインストール」をクリックします。

(3)インストール完了後、「有効化」をクリックします。

コードを挿入
(1)ダッシュボードから「設定」をクリックし、「Head and Footer」をクリックします。

(2)「<HEAD> PAGE SECTION INJECTION」はすべてのページのヘッダ内に入れる箇所です。
①にコードを入力し、②「save」をクリックします。

(3)「AFTER THE <BODY> TAG」はBODY内、「BEFORE THE </BODY> CLOSING TAG (FOOTER)」はフッター内に入力する箇所です。