<?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>Truth, Computing and Fail &#187; AdSense</title>
	<atom:link href="http://anomit.com/category/adsense/feed/" rel="self" type="application/rss+xml" />
	<link>http://anomit.com</link>
	<description></description>
	<lastBuildDate>Sat, 17 Apr 2010 21:14:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Placing AdSense ads after the first post</title>
		<link>http://anomit.com/2007/03/11/placing-adsense-ads-after-the-first-post/</link>
		<comments>http://anomit.com/2007/03/11/placing-adsense-ads-after-the-first-post/#comments</comments>
		<pubDate>Sun, 11 Mar 2007 12:40:52 +0000</pubDate>
		<dc:creator>anomit</dc:creator>
				<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://oni.ifastnet.com/2007/03/11/placing-adsense-ads-after-the-first-post/</guid>
		<description><![CDATA[Well, lets get to the point and admit that everybody wants to rake in some moolah from their AdSense susbscriptions. But the thing that bothers them the most would be the proper positioning of  the ads. Imagine a new visitor coming to your blog to see it cluttered with misplaced ads, like one bang [...]]]></description>
			<content:encoded><![CDATA[<p>Well, lets get to the point and admit that everybody wants to rake in some moolah from their AdSense susbscriptions. But the thing that bothers them the most would be the proper positioning of  the ads. Imagine a new visitor coming to your blog to see it cluttered with misplaced ads, like one bang on top of the first post. Forget about clicking on the ad, he won&#8217;t even read your first post and there you have your potential $1 bidding you goodbye.</p>
<p>I got the idea of this trick from <a href="http://blogable.net/archives/2007/02/10/wordpress-how-to-adsense-after-first-post/" target="_blank">this post at Jake Jarvis&#8217;  blog</a>. I had been on the lookout for such a thing for a long time.</p>
<p>In this post I will elaborate it a bit to make it easier for newbies at coding who may have difficulties finding out the start and end of loops.</p>
<p>The file you need to edit is <strong>index.php</strong> in most themes or like <strong>theloop.php</strong> in k2. Basically the idea is to put the ad block in the post loop. Remember that: <em>the post loop</em>.</p>
<p>Now open the required file in the Theme Editor from your wordpress admin and find the beginning of the post loop, the line containing <strong>if(have_posts()). </strong></p>
<p>For example, in theloop.php you will find it in this manner:</p>
<pre class="brush: php;">
if ( have_posts() ) {
</pre>
<p>Freshy makes life a bit easier for you, by including descriptions in the index.php file. Find out
<pre class="brush: php;">&lt;!--blog--&gt;</pre>
<p>Now that you have found this line, below this line declare a variable:</p>
<pre class="brush: php;">&lt;?php $count = 1; ?&gt;</pre>
<p>Now go to the end of the post loop, to be understood by codes like
<pre class="brush: php;">&lt;?php endif; ?&gt;</pre>
<p>. After this line of code and just before the closure of the
<pre class="brush: xml;">&lt;/div&gt;</pre>
<p> tag, add this loop:</p>
<pre class="brush: php;">
&lt;?php if ($count == 1) : ?&gt;

&lt;!-- YOUR ADSENSE CODE HERE --&gt;

&lt;?php endif; $count++; ?&gt;
</pre>
<p>Now placing the adsense code becomes easier if you are using the AdSense Deluxe plugin. It keeps the coding neat. Just put in the following line of code in the loop:</p>
<pre class="brush: php;">&lt;?php adsense_deluxe_ads('Ad_Name'); ?&gt;</pre>
<p>and you are done!!</p>
]]></content:encoded>
			<wfw:commentRss>http://anomit.com/2007/03/11/placing-adsense-ads-after-the-first-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
