<?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>WordPressology &#187; Code Snippets</title>
	<atom:link href="http://wordpressology.com/category/code-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://wordpressology.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 28 Apr 2010 03:55:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Add Unique “Per Category” RSS Feeds – WordPress</title>
		<link>http://wordpressology.com/add-unique-per-category-rss-feeds-wordpress/</link>
		<comments>http://wordpressology.com/add-unique-per-category-rss-feeds-wordpress/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 23:22:15 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://wordpressology.com/?p=56</guid>
		<description><![CDATA[<p>A client came to me the other day with a neat request. He wanted the ability to offer unique RSS feeds for each of his WordPress blog&#8217;s categories. His site uses a custom permalink strategy, but I wanted to develop&#8230; <a href="http://wordpressology.com/add-unique-per-category-rss-feeds-wordpress/" class="read_more"><br/>Read More &#8594;</a></p>]]></description>
			<content:encoded><![CDATA[<p>A client came to me the other day with a neat request. He wanted the ability to offer unique RSS feeds for each of his WordPress blog&#8217;s categories. His site uses a custom permalink strategy, but I wanted to develop a solution that would work for all WordPress configurations.</p>
<p>The following code will display a unique RSS feed on each &#8220;category archive&#8221; page within your WordPress blog or site. The feed will contain only the posts within that category. If you have any questions about the code, or if you just like it a lot, leave a comment to let me know.</p>
<pre class="brush: php;">
&lt;?php /* If this is a category archive */ if (is_category()) { ?&gt;
    &lt;span&gt;
    Subscribe to posts in &lt;a href=&quot;/wp-rss2.php?cat=&lt;?php echo get_query_var('cat'); ?&gt;&quot;&gt;&lt;?php single_cat_title(); ?&gt;&lt;/a&gt; via RSS
    &lt;/span&gt;
&lt;?php } ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://wordpressology.com/add-unique-per-category-rss-feeds-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List Recent Posts on Page or Sidebar &#8211; WordPress</title>
		<link>http://wordpressology.com/list-recent-posts-on-page-or-sidebar-wordpress/</link>
		<comments>http://wordpressology.com/list-recent-posts-on-page-or-sidebar-wordpress/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:26:26 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://breaker.taphq.com/~wpology/?p=14</guid>
		<description><![CDATA[<p>Want to list recent posts on a page? Use the code below.</p>
<p>To use it in your sidebar, just make sure your wrap the entire chunk of code in <code>&#60;li class="widget"&#62;&#60;/li&#62;</code> tags so that it is recognized as an element&#8230; <a href="http://wordpressology.com/list-recent-posts-on-page-or-sidebar-wordpress/" class="read_more"><br/>Read More &#8594;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Want to list recent posts on a page? Use the code below.</p>
<p>To use it in your sidebar, just make sure your wrap the entire chunk of code in <code>&lt;li class="widget"&gt;&lt;/li&gt;</code> tags so that it is recognized as an element of the sidebar <code>&lt;ul&gt;</code>. To add a title in the sidebar, wrap it in <code>&lt;h3 class="widget-title"&gt;Recent Posts&lt;/h3&gt;</code>, where &#8220;Recent Posts&#8221; is your desired title.</p>
<pre class="brush: php;">
&lt;?php query_posts('showposts=5'); ?&gt;
&lt;ul&gt;
    &lt;?php while (have_posts()) : the_post(); ?&gt;
        &lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;?php endwhile;?&gt;
&lt;/ul&gt;
</pre>
<p>Questions? Drop &#8216;em in the comments</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressology.com/list-recent-posts-on-page-or-sidebar-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List Categories in Sidebar – WordPress</title>
		<link>http://wordpressology.com/wordpress-list-categories-in-sidebar/</link>
		<comments>http://wordpressology.com/wordpress-list-categories-in-sidebar/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 17:54:14 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://breaker.taphq.com/~wpology/?p=6</guid>
		<description><![CDATA[<p>The code below will list categories in the appropriate format for your WordPress sidebar.<br />
For this example, we exclude items from category 10. If you don&#8217;t want to exclude any categories, just remove <code>&#38;exclude=10</code>. To exclude a different category,&#8230; <a href="http://wordpressology.com/wordpress-list-categories-in-sidebar/" class="read_more"><br/>Read More &#8594;</a></p>]]></description>
			<content:encoded><![CDATA[<p>The code below will list categories in the appropriate format for your WordPress sidebar.<br />
For this example, we exclude items from category 10. If you don&#8217;t want to exclude any categories, just remove <code>&amp;exclude=10</code>. To exclude a different category, simply change the number <code>10</code> to the number of the category that you&#8217;d like to exclude.</p>
<pre class="brush: php;">
&lt;li class=&quot;widget&quot;&gt;
  &lt;h3 class=&quot;widget-title&quot;&gt;Categories&lt;/h3&gt;
  &lt;ul&gt;
    &lt;?php wp_list_cats('sort_column=name&amp;optioncount=1&amp;exclude=10'); ?&gt;
  &lt;/ul&gt;
&lt;/li&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://wordpressology.com/wordpress-list-categories-in-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

