<?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>HandymanHowto.com &#187; cPanel</title>
	<atom:link href="http://www.handymanhowto.com/tag/cpanel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.handymanhowto.com</link>
	<description>Home improvement, maintenance and repair projects.</description>
	<lastBuildDate>Tue, 07 Sep 2010 23:05:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to Display Adsense Ads in the WordPress Index Pages for Fresh News by WooThemes &#8211; Part 2</title>
		<link>http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2/</link>
		<comments>http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 00:31:33 +0000</pubDate>
		<dc:creator>Bob Jackson</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[250x250 image ad]]></category>
		<category><![CDATA[960.css]]></category>
		<category><![CDATA[adsense in post index pages]]></category>
		<category><![CDATA[adsense on front page]]></category>
		<category><![CDATA[adsense unit]]></category>
		<category><![CDATA[Banner Ad integration]]></category>
		<category><![CDATA[cascading style sheet]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[custom adsense widget]]></category>
		<category><![CDATA[custom development]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[Fresh News Theme]]></category>
		<category><![CDATA[Google Adsense]]></category>
		<category><![CDATA[how add adsense to the front page]]></category>
		<category><![CDATA[how to increase adsense revenue]]></category>
		<category><![CDATA[How to integrate Adsense with Fresh News by WooThemes]]></category>
		<category><![CDATA[how to integrate adsense with Wordpress]]></category>
		<category><![CDATA[How to monetize your Wordpress blog]]></category>
		<category><![CDATA[image ads]]></category>
		<category><![CDATA[index.php]]></category>
		<category><![CDATA[instructions]]></category>
		<category><![CDATA[main index template]]></category>
		<category><![CDATA[make money]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[publisher id]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[sidebar ad]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[step by step]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[style.css]]></category>
		<category><![CDATA[Theme Editor]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress theme customization with adsense]]></category>

		<guid isPermaLink="false">http://www.handymanhowto.com/?p=3407</guid>
		<description><![CDATA[This tutorial is continued from Part 1. Summary of Code Changes to index.php The index.php file is the theme template that displays the Featured Posts and Post Summaries (Excerpts) to paint the body of the Front Page and Index Pages. Source code logic is added to index.php to display the Google Adsense Ads at the [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial is continued from <a title="How to Display Adsense Ads in the WordPress Index Pages for Fresh News by WooThemes – Part 1" href="http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1/" target="_blank">Part 1</a>.</p>
<h3>Summary of Code Changes to index.php</h3>
<p>The <strong>index.php</strong> file is the theme template that displays the Featured Posts and Post Summaries (Excerpts) to paint the body of the <strong>Front Page</strong> and <strong>Index Pages</strong>. Source code logic is added to index.php to display the Google Adsense Ads at the appropriate position in the summaries and <strong>only once per page</strong> to stay within the maximum of 3 ads per web page.</p>
<p>First, a new variable is created to ensure the Adsense Ads are display only once per page at line 27:</p>
<pre class="brush: php; first-line: 27;">
&lt;?php $BannerAdsDisplayed = FALSE; ?&gt; &lt;!-- Boolean to show featured banner ads only once. --&gt;
</pre>
<p><span id="more-3407"></span></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2484226848394294";
google_ad_slot = "3301193618";
google_ad_width = 336;
google_ad_height = 280;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>The main code for the <strong>Featured Banner Ads</strong> &#8211; this is how I described the new feature in the php  comments &#8211; is on lines 61 to 99:</p>
<pre class="brush: php; first-line: 61;">
           &lt;!-- Featured Banner Ads 250px x 250px --&gt;
           &lt;?php if (($BannerAdsDisplayed == FALSE &amp;amp;&amp;amp; !$is_paged) || /* show on main page after featured posts */
                     ($is_paged &amp;amp;&amp;amp; $postcount == 3)) /* show after the 3rd post on index pages 2 and greater */
           { ?&gt;
           &lt;?php   $BannerAdsDisplayed = TRUE; ?&gt;
              &lt;div class=&amp;quot;box&amp;quot;&gt;
                 &lt;div id=&amp;quot;featured_ads&amp;quot;&gt;
                    &lt;div id=&amp;quot;banner_ad_left&amp;quot;&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;&gt;&lt;!--
                           google_ad_client = &amp;quot;pub-2484226848394294&amp;quot;;
                           /* 250x250, created 6/10/08 */
                           google_ad_slot = &amp;quot;8646292631&amp;quot;;
                           google_ad_width = 250;
                           google_ad_height = 250;
                           //--&gt;
                       &lt;/script&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;
                           src=&amp;quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&amp;quot;&gt;
                       &lt;/script&gt;
                    &lt;/div&gt;
                    &lt;div id=&amp;quot;banner_ad_right&amp;quot;&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;&gt;&lt;!--
                           google_ad_client = &amp;quot;pub-2484226848394294&amp;quot;;
                           /* 250x250, created 6/10/08 */
                           google_ad_slot = &amp;quot;8646292631&amp;quot;;
                           google_ad_width = 250;
                           google_ad_height = 250;
                           //--&gt;
                       &lt;/script&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;
                           src=&amp;quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&amp;quot;&gt;
                       &lt;/script&gt;
                    &lt;/div&gt;
                 &lt;/div&gt; &lt;!-- featured ads --&gt;
              &lt;/div&gt; &lt;!--/box --&gt;
           &lt;?php
           } ?&gt;	&lt;!-- if($BannerAdsDisplayed...) --&gt;

           &lt;!-- Featured Banner Ads Ends --&gt;
</pre>
<h4>Disable the Post Date Display</h4>
<p>I&#8217;ve disabled the post date display on all my posts <strong>purely as a matter of personal preference </strong>- see lines 38 to 42 and 106 to 110. If you want the post date to be shown as usual, simply <strong>uncomment these lines</strong>. Either way, this <strong>change is unrelated</strong> to the  Google Adsense enhancements and has no impact on the Ad display logic.</p>
<pre class="brush: php; first-line: 38;">
&lt;?php
/************* suppress the date display on posts
&lt;p class=&amp;quot;fl&amp;quot;&gt;&lt;?php the_time('j. F Y'); ?&gt;&lt;/p&gt;
*/
?&gt;
</pre>
<p>and</p>
<pre class="brush: php; first-line: 106;">
&lt;?php
/************* suppress the date display on posts
&lt;p class=&amp;quot;fl&amp;quot;&gt;&lt;?php the_time('j. F Y'); ?&gt;&lt;/p&gt;
*/
?&gt;
</pre>
<p>Now let&#8217;s make the changes to index.php.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2484226848394294";
google_ad_slot = "3301193618";
google_ad_width = 336;
google_ad_height = 280;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<h3>Edit index.php</h3>
<p>If you haven&#8217;t already made a backup of your WordPress database, <strong>please do so now.</strong> If you make an error in the edits to index.php it can possibly make your blog unreadable.</p>
<p>The following instructions assumes you&#8217;ve not made any customizations to index.php and you&#8217;re using Fresh News v2.0.7. If you&#8217;re using a different version or have made other customizations, you&#8217;ll need to &#8220;stare and compare&#8221; and merge the Adsense code enhancements using your judgment.</p>
<ul>
<li>Log in to your WordPress Admin Panel.</li>
<li>Open the Theme Editor at <strong>Appearance</strong> → <strong>Editor</strong> in the left navigation menu.</li>
<li>Open the Main Index Template file <strong>index.php</strong> by clicking on it in the right menu.</li>
<li>Right click in the editor and choose <strong>Select All</strong>.</li>
<li>Right click and choose <strong>Cut</strong>. The content of the Theme Editor is now <strong>empty</strong>.</li>
<li>Open Notepad or your favorite text editor and paste the contents of index.php into notepad. Now <span style="text-decoration: underline;">save this original copy</span> of index.php to your local computer <span style="text-decoration: underline;">just in case you need to recover the original version</span> (this will be quicker than restoring the site backup.) Alternately, use File Manager in cPanel and/or save a copy using FTP.</li>
</ul>
<div id="attachment_3424" class="wp-caption alignnone" style="width: 460px"><a href="http://www.handymanhowto.com/wp-content/uploads/2009/09/Main-Index-Template-Theme-Editor.png"><img class="size-medium wp-image-3424" title="Theme Editor - Main Index Template: index.php " src="http://www.handymanhowto.com/wp-content/uploads/2009/09/Main-Index-Template-Theme-Editor-450x241.png" alt="Theme Editor - Main Index Template: index.php " width="450" height="241" /></a><p class="wp-caption-text">Theme Editor - Main Index Template: index.php </p></div>
<ul>
<li><strong><span style="color: #ff0000;">The full source code for the Adsense enhancements is here:</span></strong> <a href="http://www.handymanhowto.com/wp-content/uploads/2009/09/index_php.txt">index.php</a></li>
<li>Paste the upgraded index.php code into the Theme Editor.</li>
<li>Replace my Adsense 250&#215;250 code unit with <strong>your Adsense code</strong> on lines 69 to 79 and 82 to 92 as highlighted:</li>
</ul>
<pre class="brush: php; first-line: 65; highlight: [69,70,71,72,73,74,75,76,77,78,79,82,83,84,85,86,87,88,89,90,91,92];">
           &lt;?php   $BannerAdsDisplayed = TRUE; ?&gt;
              &lt;div class=&amp;quot;box&amp;quot;&gt;
                 &lt;div id=&amp;quot;featured_ads&amp;quot;&gt;
                    &lt;div id=&amp;quot;banner_ad_left&amp;quot;&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;&gt;&lt;!--
                           google_ad_client = &amp;quot;pub-2484226848394294&amp;quot;;
                           /* 250x250, created 6/10/08 */
                           google_ad_slot = &amp;quot;8646292631&amp;quot;;
                           google_ad_width = 250;
                           google_ad_height = 250;
                           //--&gt;
                       &lt;/script&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;
                           src=&amp;quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&amp;quot;&gt;
                       &lt;/script&gt;
                    &lt;/div&gt;
                    &lt;div id=&amp;quot;banner_ad_right&amp;quot;&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;&gt;&lt;!--
                           google_ad_client = &amp;quot;pub-2484226848394294&amp;quot;;
                           /* 250x250, created 6/10/08 */
                           google_ad_slot = &amp;quot;8646292631&amp;quot;;
                           google_ad_width = 250;
                           google_ad_height = 250;
                           //--&gt;
                       &lt;/script&gt;
                       &lt;script type=&amp;quot;text/javascript&amp;quot;
                           src=&amp;quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&amp;quot;&gt;
                       &lt;/script&gt;
                    &lt;/div&gt;
                 &lt;/div&gt; &lt;!-- featured ads --&gt;
              &lt;/div&gt; &lt;!--/box --&gt;
</pre>
<ul>
<li>Click &#8220;Update File&#8221; to save.</li>
</ul>
<h3>Test the Adsense Upgrade to Front Page and Index Pages</h3>
<p>In a new web browser window, open your web site and confirm the two Google Adsense Ads are displayed after the Featured Posts on the Front Page, and after the 2nd post summary on the following Index Pages.</p>
<p>If something doesn&#8217;t look right, just paste the original source code back into index.php and save to restore the original look and feel.</p>
<h3>Track the Performance of the new 250&#215;250 Page Ads</h3>
<p>If you&#8217;re interested to know how well the new Adsense Ads are performing, log in to your Adsense Account and create a <a title="Adsense Custom Channels" href="https://www.google.com/adsense/support/bin/answer.py?answer=9869" target="_blank">custom channel</a> to track the performance of the new ad units.</p>
<p>Hope this helps,</p>
<p>Bob Jackson</p>
<p></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It!</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+2" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+2" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+2" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+2" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+2" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.squidoo.com/lensmaster/bookmark?http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F" rel="nofollow" title="Add to&nbsp;Squidoo"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/squidoo.png" title="Add to&nbsp;Squidoo" alt="Add to&nbsp;Squidoo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2%2F&amp;t=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+2" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Display Adsense Ads in the WordPress Index Pages for Fresh News by WooThemes &#8211; Part 1</title>
		<link>http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1/</link>
		<comments>http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 00:22:25 +0000</pubDate>
		<dc:creator>Bob Jackson</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[960.css]]></category>
		<category><![CDATA[adsense in post index pages]]></category>
		<category><![CDATA[adsense on front page]]></category>
		<category><![CDATA[adsense unit]]></category>
		<category><![CDATA[Banner Ad integration]]></category>
		<category><![CDATA[cascading style sheet]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[custom adsense widget]]></category>
		<category><![CDATA[custom development]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[Fresh News Theme]]></category>
		<category><![CDATA[Google Adsense]]></category>
		<category><![CDATA[how add adsense to the front page]]></category>
		<category><![CDATA[how to increase adsense revenue]]></category>
		<category><![CDATA[How to integrate Adsense with Fresh News by WooThemes]]></category>
		<category><![CDATA[how to integrate adsense with Wordpress]]></category>
		<category><![CDATA[How to monetize your Wordpress blog]]></category>
		<category><![CDATA[image ads]]></category>
		<category><![CDATA[index.php]]></category>
		<category><![CDATA[instructions]]></category>
		<category><![CDATA[main index template]]></category>
		<category><![CDATA[make money]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[publisher id]]></category>
		<category><![CDATA[sidebar ad]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[step by step]]></category>
		<category><![CDATA[style sheet]]></category>
		<category><![CDATA[style.css]]></category>
		<category><![CDATA[Theme Editor]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress theme customization with adsense]]></category>

		<guid isPermaLink="false">http://www.handymanhowto.com/?p=3371</guid>
		<description><![CDATA[This tutorial explains how to display Google Adsense Ads in your WordPress post index pages to generate revenue from this prime area of web page real estate. Revenue Opportunity for Front- and Index Page Ads I use the Fresh News 2.0.7 theme by WooThemes for the primary look and feel of www.handymanhowto.com and wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial explains how to display Google Adsense Ads in your WordPress post index pages to generate revenue from this prime area of web page real estate.</p>
<h3>Revenue Opportunity for Front- and Index Page Ads</h3>
<p>I use the <a title="Fresh News theme by WooThemes, Inc." href="http://www.woothemes.com/2008/04/fresh-news/" target="_blank">Fresh News 2.0.7 theme</a> by <a title="Wordpress themes for all types of publishers." href="http://www.woothemes.com/" target="_blank">WooThemes</a> for the primary look and feel of <a title="Home Improvement Projects, Advice and Technology" href="www.handymanhowto.com" target="_blank">www.handymanhowto.com</a> and wanted to display the maximum allowed three (3) Google Adsense Ads on all my pages and articles, including the Front Page and Index Pages. All pages have a 300&#215;250 Adsense ad in the sidebar which counts as one (1) Adsense Ad per web page. Individual articles (or single posts) contain two (2) additional Adsense Ads in the post body bringing the total number of ads for a single post web page to the maximum of 3 allowed by Google.</p>
<p><span id="more-3371"></span><script type="text/javascript"><!--
google_ad_client = "pub-2484226848394294";
google_ad_slot = "3301193618";
google_ad_width = 336;
google_ad_height = 280;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>The problem is the Front Page  and post Index Pages did not contain Google Ads in the page body because there was no plug-n-play or widget-based method in the Fresh News theme to include the Adsense code, leaving these frequently viewed pages with only the single ad in the sidebar. I was missing a revenue opportunity to display two additional ads on prime web page real estate.</p>
<p>The next image illustrates the solution with two 250&#215;250 Adsense Ads displayed immediately after the Featured Posts for a total of three (3) Google ads on the Front Page.</p>
<div id="attachment_3377" class="wp-caption alignnone" style="width: 444px"><a href="http://www.handymanhowto.com/wp-content/uploads/2009/09/Main-Page.png"><img class="size-medium wp-image-3377" title="Google Adsense Ads in the WordPress Page Index for Fresh News" src="http://www.handymanhowto.com/wp-content/uploads/2009/09/Main-Page-434x600.png" alt="Google Adsense Ads in the WordPress Page Index for Fresh News" width="434" height="600" /></a><p class="wp-caption-text">Google Adsense Ads in the WordPress Page Index for Fresh News</p></div>
<p>Ads are displayed after the 2nd blog post on Index Pages for a total of three (3) Google ads per page as allowed by the Adsense program rules:</p>
<div id="attachment_3376" class="wp-caption alignnone" style="width: 460px"><a href="http://www.handymanhowto.com/wp-content/uploads/2009/09/Index-Pages.png"><img class="size-medium wp-image-3376" title="Google Adsense within Index Pages for Fresh News" src="http://www.handymanhowto.com/wp-content/uploads/2009/09/Index-Pages-450x488.png" alt="Google Adsense within Index Pages for Fresh News" width="450" height="488" /></a><p class="wp-caption-text">Google Adsense within Index Pages for Fresh News</p></div>
<p>Single post pages are unchanged by the Front Page and Index Page modifications.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-2484226848394294";
google_ad_slot = "3301193618";
google_ad_width = 336;
google_ad_height = 280;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<h2>Fresh News Theme Modifications for Google Adsense Ads</h2>
<p>Before you begin, <span style="text-decoration: underline;">make a backup of your WordPress site</span> because changes will be made to the Fresh News Theme source code files.</p>
<h3>Step 1: Create a 250&#215;250 pixel Google Banner Ad</h3>
<ul>
<li>Log in to your Google Adsense Account at <a title="Google Adsense" href="http://adsense.google.com" target="_blank">http://adsense.google.com</a>.</li>
<li>Go to Adsense for Content and create a square 250&#215;250 Image Ad.</li>
<li>Copy the Adsense Unit Code and save it a local file for later.</li>
</ul>
<p>Here&#8217;s the Adsense code for my 250&#215;250 image ad. Note that your publisher id will be different.</p>
<pre class="brush: php;">&lt;script type=&quot;text/javascript&quot;&gt;&lt;!-- google_ad_client =&quot;pub-2484226848394294&quot;;
/* 250x250, created 6/10/08 */
google_ad_slot = &quot;8646292631&quot;;
google_ad_width = 250;
google_ad_height = 250; //--&gt;
&lt;/script&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;&lt;/script&gt;</pre>
<h3>Step 2: Edit your Cascading Style Sheet file:  style.css</h3>
<p>New stylesheet properties are created to properly position the two Adsense ads. The center column is 580 pixels wide as found in the 960.css file: property .grid_10{width:580px}.container_16. (<a title="Firebug web development tool" href="http://getfirebug.com/" target="_blank">Firebug</a> is indispensable for web page is forensics and analysis.) Careful measuring and testing finds that the Featured Post post excerpt div element is 542 pixels wide after allowing for margins. The style sheet pushes one ad to the left (float:left) and one to the right (float:right) of the 542 pixel wide x 270 pixel tall container.</p>
<p>To make the changes to style.css:</p>
<ul>
<li>Log in to your WordPress Admin Panel.</li>
<li>Open the Theme Editor at <strong>Appearance</strong> → <strong>Editor</strong> in the left navigation menu.</li>
<li>Open the Stylesheet file <strong>styles.css</strong> &#8211; it will be near the bottom of the right menu.</li>
<li>Add the following lines of CSS code to the bottom of the file for the Google Ads.</li>
</ul>
<pre class="brush: css;">/*==============  Featured Post Banner Ads  ===================*/
#featured_ads {
       width: 542px;
        height: 270px;
       overflow: hidden;
}

#featured_ads #banner_ad_left {
        float: left;
        width: 250px;
       margin: 10px;
}

#featured_ads #banner_ad_right {
        float: right;
        width: 250px;
        margin: 10px;
}</pre>
<p>The new CSS lines are highlighted in this image:</p>
<div id="attachment_3394" class="wp-caption alignnone" style="width: 460px"><a href="http://www.handymanhowto.com/wp-content/uploads/2009/09/Edit-style_css.png"><img class="size-medium wp-image-3394" title="Edit the Fresh News Style Sheet - style.css" src="http://www.handymanhowto.com/wp-content/uploads/2009/09/Edit-style_css-450x240.png" alt="Edit the Fresh News Style Sheet - style.css" width="450" height="240" /></a><p class="wp-caption-text">Edit the Fresh News Style Sheet - style.css</p></div>
<ul>
<li>Click &#8220;Update File&#8221; to save your changes.</li>
</ul>
<p>Here&#8217;s the CSS code snippet for the Adsense style additions: <a href="http://www.handymanhowto.com/wp-content/uploads/2009/09/style_css_ad_enhancements.txt">style.css Adsense enhancements</a></p>
<p>This tutorial is continued in <a title="How to Display Adsense Ads in the WordPress Index Pages for Fresh News by WooThemes – Part 2" href="http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-2/" target="_blank">Part 2</a>.</p>
<p>Take care,</p>
<p>Bob Jackson</p>
<p></p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It!</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+1" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+1" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+1" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+1" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F&amp;title=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+1" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.squidoo.com/lensmaster/bookmark?http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F" rel="nofollow" title="Add to&nbsp;Squidoo"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/squidoo.png" title="Add to&nbsp;Squidoo" alt="Add to&nbsp;Squidoo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.handymanhowto.com%2F2009%2F09%2F20%2Fhow-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1%2F&amp;t=How+to+Display+Adsense+Ads+in+the+WordPress+Index+Pages+for+Fresh+News+by+WooThemes+%26%238211%3B+Part+1" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.handymanhowto.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.handymanhowto.com/2009/09/20/how-to-display-adsense-ads-in-the-wordpress-index-pages-for-fresh-news-by-woothemes-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
