<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>philipnorris.ie &#187; code</title>
	<atom:link href="http://philipnorris.ie/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://philipnorris.ie</link>
	<description>Ken ore, ya mo tsuki</description>
	<lastBuildDate>Fri, 10 Jul 2009 10:52:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress: Add a &#8220;Tweet This&#8221; Link to Posts</title>
		<link>http://philipnorris.ie/2009/07/06/wordpress-add-a-tweet-this-link-to-posts/</link>
		<comments>http://philipnorris.ie/2009/07/06/wordpress-add-a-tweet-this-link-to-posts/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 13:04:30 +0000</pubDate>
		<dc:creator>Philip Norris</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Programming & Development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://philipnorris.ie/?p=121</guid>
		<description><![CDATA[One of the easiest ways to allow people to share your blog posts on Twitter is by allowing them to tweet directly from your site. There are a number of plugins available to help you do this. However, here we will look at one quick and simple method that does not require any plugins to be installed on your blog.]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_165" class="wp-caption aligncenter" style="width: 480px"><a href="http://philipnorris.ie/2009/07/wordpress-add-a-tweet-this-link-to-posts/"><img src="http://philipnorris.ie/wordpress/wp-content/uploads/2009/07/20090709_0011.jpg" alt="Wordpress &amp; Twitter Tutorial" title="Wordpress &amp; Twitter Tutorial" width="470" height="180" class="size-full wp-image-165" /></a><p class="wp-caption-text">Wordpress &#038; Twitter Tutorial</p></div><br />
Research firm Hitwise was recently commissioned to conduct a study focused on the UK online market. Among <a title="Report by Hitwise" href="http://news.softpedia.com/news/Twitter-an-Important-Traffic-Source-in-the-UK-115125.shtml">their findings</a> they reported that one out of every 350 visits to a UK site comes from the social networking site <a title="Twitter" href="http://www.twitter.com">Twitter</a>, making it the 30th largest source of traffic in the UK.</p>
<p>The report goes on to say that while only 9.5% of this traffic is driven toward commercial sites almost 56% of it goes to other social networking sites, media sites and blogs. It&#8217;s clear to see from this that Twitter can be an important source of traffic to your blog.</p>
<p>One of the easiest ways to allow people to share your blog posts on Twitter is by allowing them to tweet directly from your site. There are a number of plugins available to help you do this. However, here we will look at one quick and simple method that does not require any plugins to be installed on your blog.<br />
<span id="more-121"></span></p>
<h2>Adding the Link to Wordpress</h2>
<p><strong>Step 1:</strong> Open the header.php file of the Wordpress theme you are currently using. Locate the closing &lt;/HEAD&gt; tag and insert the following lines just before it.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;?</span>php <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">?&gt;</span>
   <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> charset<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;utf-8&quot;</span>
            src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://bit.ly/javascript-api.js?version=latest&amp;login=tweettrackjs&amp;apiKey=R_7e9987b2fd13d7e4e881f9cbb168f523&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> charset<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;utf-8&quot;</span>
            src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://s.bit.ly/TweetAndTrack.js?v=1.01&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;?</span>php <span style="color: #009900;">&#125;</span> <span style="color: #339933;">?&gt;</span></pre></div></div>

<p><strong>Step 2:</strong> Open the single.php file of the Wordpress theme you are using. Insert the following lines below the_content() function.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;#&quot; onclick=&quot;return TweetAndTrack.open(this, '&lt;?php echo get_permalink();?&gt;');&quot;&gt;
&lt;span style=&quot;display:none;&quot;&gt;Reading: &lt;?php the_title();?&gt;&lt;/span&gt;Tweet This Post on Twitter&lt;/a&gt;</pre></div></div>

<p>Of course you can modify the final line of code to display whatever text you want your visitors to see. You can even replace the text entirely with an image file if you wish.</p>
]]></content:encoded>
			<wfw:commentRss>http://philipnorris.ie/2009/07/06/wordpress-add-a-tweet-this-link-to-posts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
