<?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>Rikcat Industries &#187; categories</title>
	<atom:link href="http://www.rikcatindustries.com/tag/categories/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rikcatindustries.com</link>
	<description>The Portfolio of Rik Catlow</description>
	<lastBuildDate>Sat, 28 Feb 2009 04:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Comma-Separated Categories in WordPress</title>
		<link>http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/</link>
		<comments>http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 20:00:37 +0000</pubDate>
		<dc:creator>Rik Catlow</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/</guid>
		<description><![CDATA[Recently I worked on a project in WordPress that was going to have a lot of categories and I wanted to display the categories comma delimited. After fooling with WordPress&#8217;s wp_list_categories function to list categories, I realized that it only allowed you to display categories as a list or delimited by a &#60;br&#62;. So after [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I worked on a project in <a href="http://www.wordpress.org/" target="_blank">WordPress</a> that was going to have a lot of categories and I wanted to display the categories comma delimited.  After fooling with WordPress&#8217;s  <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories" target="_blank">wp_list_categories</a> function to list categories, I realized that it only allowed you to display categories as a list or delimited by a &lt;br&gt;. So after looking around on Google to no avail, I decided to whip up a function that allows for different delimiters. The function is fairly simple with one argument for the string of the delimiter. <span id="more-21"></span></p>
<p><a href="http://www.rikcatindustries.com/ri/wp-content/themes/ri/downloads/delimited_cat_23.zip" title="Download Delimited Categories Code" class="blk_button">&darr;&nbsp; Works with WordPress 2.3</a><br /> <br />
<a href="http://www.rikcatindustries.com/ri/wp-content/themes/ri/downloads/delimited_cat.zip" title="Download Delimited Categories Code" class="blk_button">&darr;&nbsp;  Works with WordPress 2.0 > 2.2</a></p>
<h3>Calling the Function</h3>
<p>In my theme folder I have a file called functions.php that gets loaded when the theme is loaded. If your theme doesn&#8217;t have one you can create one. Copy and paste this function into the functions.php file. Now all you have to do is call the function in the theme template where you want your category links to show up.</p>
<pre class="code"><code>
&lt;?php echo delimited_cat();&nbsp;?&gt;
</code></pre>
<p>You can also pass the function an argument and change the default &#8220;, &#8221; delimiter to anything you like. The example below would delimit by a pipe with spaces on both sides.</p>
<pre class="code"><code>
&lt;?php echo delimited_cat(' | ');&nbsp;?&gt;
</code></pre>
<p>Uses this code at your own risk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
