<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Best way to insert a javascript code on the ? &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/feed/</link>
		<description></description>
		<lastBuildDate>Sun, 19 Oct 2025 18:14:42 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1285</guid>
					<title><![CDATA[Best way to insert a javascript code on the ?]]></title>
					<link>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1285</link>
					<pubDate>Thu, 05 Dec 2013 21:21:30 +0000</pubDate>
					<dc:creator>Dudu P</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>I need to insert a Pingdom javascript code on the &lt;head&gt; section of the template. Since I haven&#8217;t made any modifications on it, I would like to do it the recommended way. What&#8217;s that supposed to be?</p>
<p>Cheers and thanks in advance!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1293</guid>
					<title><![CDATA[Reply To: Best way to insert a javascript code on the ?]]></title>
					<link>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1293</link>
					<pubDate>Thu, 05 Dec 2013 22:53:55 +0000</pubDate>
					<dc:creator>Kory</dc:creator>

					<description>
						<![CDATA[
						<p>Hey Dudu,</p>
<p>Does the Pingdom code have to be in the <strong>&lsaquo;head&rsaquo;</strong> of your site, or can it go towards the bottom near the closing <strong>&lsaquo;/body&rsaquo;</strong></p>
<p>If it can go near the bottom of your webpage, this is a great thing to use the <strong>Custom</strong> section of the Customizer for. In this section, you can enter custom CSS or JavaScript to go onto your site. Your CSS changes are echoed out in the <strong>&lsaquo;head&rsaquo;</strong>, and JavaScript is echoed out towards the bottom of your site. This is also the perfect place to place bits of code that you don&#8217;t have to manage often, such as Google Analytics code, or your Pingdom snippet. There&#8217;s more information on this section in our <a href="http://theme.co/x/member/video-tutorials/customizer/" title="Video Tutorials" rel="nofollow">Video Tutorials section here</a> towards the bottom.</p>
<p>If it needs to go in the <strong>&lsaquo;head&rsaquo;</strong> for certain, let me know and I&#8217;ll get back with you on how to do that. It&#8217;s slightly more involved, but nothing too crazy. 🙂</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1327</guid>
					<title><![CDATA[Reply To: Best way to insert a javascript code on the ?]]></title>
					<link>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1327</link>
					<pubDate>Fri, 06 Dec 2013 00:12:07 +0000</pubDate>
					<dc:creator>Dudu P</dc:creator>

					<description>
						<![CDATA[
						<p>Wow, thanks for the prompt reply! 🙂</p>
<p>So I&#8217;ve used the Custom section and it worked great, but unfortunately Pingdom&#8217;s script is required to be on the &lt;head&gt; section. A shame, I know… 😛</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1328</guid>
					<title><![CDATA[Reply To: Best way to insert a javascript code on the ?]]></title>
					<link>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1328</link>
					<pubDate>Fri, 06 Dec 2013 02:16:07 +0000</pubDate>
					<dc:creator>Kory</dc:creator>

					<description>
						<![CDATA[
						<p>No problem! Alright, so here&#8217;s what you&#8217;re going to want to do.</p>
<p>1. Download the child themes folder and unzip it to reveal the four child themes inside. Install the child theme for the stack you&#8217;re using. Additionally, if you&#8217;re using Integrity, make sure to use the correct one depending on which style you&#8217;re using (light or dark).</p>
<p>2. Unzip the child theme you&#8217;re going to use open the <strong>functions.php</strong> file inside.</p>
<p>3. Enter in the following snippet of code:</p>
<pre>function x_include_pingdom_snippet() { ?>
  // place your pingdom script here
<?php }

add_action( 'wp_head', 'x_include_pingdom_snippet' );</pre>
<p>4. Save the file, zip up the child theme, then upload it into your WordPress installation. Simply activate the theme and you're good to go.</p>
<p>Take note that activating the child theme will be like starting with a clean slate in the Customizer, so it would be a good idea to export your current settings and then import them again once you activate the child theme if you've made extensive updates to your site.</p>
<p>Let us know if you run into any issues and we'll make sure to get you up and running!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1347</guid>
					<title><![CDATA[Reply To: Best way to insert a javascript code on the ?]]></title>
					<link>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1347</link>
					<pubDate>Fri, 06 Dec 2013 20:41:20 +0000</pubDate>
					<dc:creator>Dudu P</dc:creator>

					<description>
						<![CDATA[
						<p>I&#8217;ve followed the steps but when I activate the new child-theme I got a blank screen for both the WP Admin and the site itself.</p>
<p>When I remove the code from the functions.php via FTP everything works fine again.</p>
<p>I believe it might be something related to they way the script is declared within the function (I&#8217;m not good with PHP syntax):</p>
<pre><code>
function x_include_pingdom_snippet() { ?&gt;

&lt;script&gt;
var _prum = [[&#039;id&#039;, &#039;529f9a10abe53df61d000000&#039;],
             [&#039;mark&#039;, &#039;firstbyte&#039;, (new Date()).getTime()]];
(function() {
    var s = document.getElementsByTagName(&#039;script&#039;)[0]
      , p = document.createElement(&#039;script&#039;);
    p.async = &#039;async&#039;;
    p.src = &#039;//rum-static.pingdom.net/prum.min.js&#039;;
    s.parentNode.insertBefore(p, s);
})();
&lt;/script&gt;

&lt; ?php }

add_action( &#039;wp_head&#039;, &#039;x_include_pingdom_snippet&#039; );</code></pre>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1349</guid>
					<title><![CDATA[Reply To: Best way to insert a javascript code on the ?]]></title>
					<link>https://theme.co/archive/forums/topic/best-way-to-insert-a-javascript-code-on-the/#post-1349</link>
					<pubDate>Fri, 06 Dec 2013 21:03:25 +0000</pubDate>
					<dc:creator>Kory</dc:creator>

					<description>
						<![CDATA[
						<p>Dudu,</p>
<p>This should work, I just tested it out myself and everything is fine. I think I see what the problem is though. You&#8217;ll notice that we close out the end of the function line with <strong>?&rsaquo;</strong>. We add back in our opening PHP tag after your script and before the <strong>}</strong> curly brace with <strong>&lsaquo;?php</strong>. It appears that the formatting is adding in a space after the <strong>&lsaquo;</strong> and before the <strong>?</strong> for this opening PHP tag. Make sure that you remove the space from this opening tag and let me know if that fixes things.</p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

