<?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>Open Source Business &#187; wordpress</title>
	<atom:link href="http://gasperson.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://gasperson.com</link>
	<description>tech journalist Tina Gasperson</description>
	<lastBuildDate>Mon, 09 Feb 2009 14:48:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Quick custom text ad placement in WordPress blog categories</title>
		<link>http://gasperson.com/2009/02/quick-custom-text-ad-placement-in-wordpress-blog-categories/</link>
		<comments>http://gasperson.com/2009/02/quick-custom-text-ad-placement-in-wordpress-blog-categories/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 14:48:25 +0000</pubDate>
		<dc:creator>tina</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[text ad]]></category>

		<guid isPermaLink="false">http://gasperson.com/?p=78</guid>
		<description><![CDATA[WordPress plugins abound for Google AdSense and other third-party text ad brokers, but what happens when someone wants to buy ad space directly from you, on a specific category page in your blog? You can easily add static HTML text ads to your category search result pages by creating category-specific page templates. Because most WordPress [...]]]></description>
			<content:encoded><![CDATA[<div class="xar-clearleft">WordPress plugins abound for Google AdSense and other third-party text ad brokers, but what happens when someone wants to buy ad space directly from you, on a specific category page in your blog? You can easily add static HTML text ads to your category search result pages by creating category-specific page templates.</div>
<div id="featurecontent" class="xar-align-left">
<p>Because most WordPress themes have a single template for archives, aptly named archive.php, it&#8217;s not immediately apparent how to place a text ad on a specific category results page. But never fear: by default, WordPress searches using what it calls a &#8220;template hierarchy.&#8221; By taking advantage of the template hierarchy, it&#8217;s easy to make a special page that keeps your text ad where it belongs.</p>
<p>The template hierarchy works like this: if your visitor clicks on category #3, WordPress first looks for the most specific template: category-3.php. If it doesn&#8217;t find that, then it goes after the more generic category.php, and then archive.php, and if it doesn&#8217;t find that, it finally drops back to index.php. Armed with this knowledge, you can create a category-specific template using archive.php as a base. (Note: your categories probably have actual names, not numbers, but WordPress assigns ID numbers to categories, just as it does with pages and posts. If you don&#8217;t know the ID numbers off the top of your head, look in the administration panel under Manage -&gt; Categories; the numbers are in that first column.)</p>
<p>To create your custom category page, open a copy of the archive.php file in a text editor and save it with a name that matches whatever category number you want to display the ad in &#8212; category-<em>#</em>.php. Place the static text ad into your new category-specific PHP file by surrounding the HTML code with <code>&lt;div id="sticky-snip"&gt;&lt;/div&gt;</code>. Then paste that snippet, including the <code>div</code> tags, into the file, directly under this line of code: <code>&lt;?php get_header(); ?&gt; </code>, as in this <a href="../category-5.txt">example</a>. Save the file, upload it to wp-content/themes/<em>your_theme</em>, and you&#8217;re done.</p>
<p>Granted, this is static code in a dynamic page and therefore not the most elegant solution, but it works. You PHP wizards out there might have a better way to write this, especially for situations where you need to publish several different ads in different categories. In that case, we welcome your suggestions &#8212; or a new plugin.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://gasperson.com/2009/02/quick-custom-text-ad-placement-in-wordpress-blog-categories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

