<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Head on No Subject - nosubject.io -</title><link>https://nosubject.io/en/tags/head/</link><description>Recent content in Head on No Subject - nosubject.io -</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 23 Feb 2020 00:19:05 +0900</lastBuildDate><atom:link href="https://nosubject.io/en/tags/head/index.xml" rel="self" type="application/rss+xml"/><item><title>WordPress: How to Paste Code Between the &lt;head&gt; and &lt;/head&gt; Tags in the Cocoon Child Theme</title><link>https://nosubject.io/en/wordpress-cocoon-edit-header-tag/</link><pubDate>Sun, 23 Feb 2020 00:19:05 +0900</pubDate><guid>https://nosubject.io/en/wordpress-cocoon-edit-header-tag/</guid><description>&lt;p&gt;I use the Cocoon Child theme. I did not know how to put the Google Adsense code inside the &amp;lt;head&amp;gt; tag, so I looked it up.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;*Update: You can now change this from the settings screen, so I added notes about that too.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;In the WordPress dashboard, open &lt;span class="bold"&gt;Appearance -&gt; Theme Editor&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;From the theme file list on the right, select &lt;span class="bold"&gt;tmp-user -&gt; head-insert.php&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;At the bottom there is a line that says &lt;span class="red"&gt;&amp;lt;? //全ての訪問者をカウントする場合は以下に挿入 ?&amp;gt;&lt;/span&gt;. Paste the code you want to insert below that line.&lt;/li&gt;&lt;li&gt;Press the &lt;span class="bold"&gt;Update File&lt;/span&gt; button at the bottom of the screen, and you are done.&lt;/li&gt;&lt;/ul&gt;
&lt;figure class="wp-block-image size-large"&gt;&lt;img src="https://nosubject.io/wp-content/uploads/2020/02/image-5.png" alt="" class="wp-image-189"/&gt;&lt;/figure&gt;
&lt;h4&gt;head-insert.php Configuration Example&lt;/h4&gt;
&lt;pre class="wp-block-code"&gt;&lt;code&gt;&amp;lt;?php
//ヘッダー部分（&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;内）にタグを挿入したいときは、このテンプレートに挿入（ヘッダーに挿入する解析タグなど）
//子テーマのカスタマイズ部分を最小限に抑えたい場合に有効なテンプレートとなります。
//例：&amp;lt;script type="text/javascript"&amp;gt;解析コード&amp;lt;/script&amp;gt;
?&amp;gt;
&amp;lt;?php if (!is_user_administrator()) :
//管理者を除外してカウントする場合は以下に挿入 ?&amp;gt;
&lt;p&gt;&amp;lt;?php endif; ?&amp;gt;
&amp;lt;?php //全ての訪問者をカウントする場合は以下に挿入 ?&amp;gt;
&amp;lt;script data-ad-client=&amp;ldquo;ca-pub-XXXXXXX&amp;rdquo; async src=&amp;ldquo;&lt;a href="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js%22&amp;amp;gt;&amp;amp;lt;/script"&gt;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&amp;gt;&amp;lt;/script&lt;/a&gt;&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</description></item></channel></rss>