<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to Use the_category Tag Without Links in WordPress</title>
	<atom:link href="http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/</link>
	<description>Perry Butler&#039;s Blog, Music Productions, Services, and Software Development.</description>
	<lastBuildDate>Mon, 30 Jan 2012 15:52:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jon</title>
		<link>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/comment-page-1/#comment-11836</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Mon, 26 Dec 2011 21:34:03 +0000</pubDate>
		<guid isPermaLink="false">http://glassocean.net/?p=589#comment-11836</guid>
		<description>Awesome. This was just what I was looking for! I&#039;m making a custom table for a client and I needed the categories without links. You made it painless =)</description>
		<content:encoded><![CDATA[<p>Awesome. This was just what I was looking for! I&#8217;m making a custom table for a client and I needed the categories without links. You made it painless =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul N</title>
		<link>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/comment-page-1/#comment-6793</link>
		<dc:creator>Paul N</dc:creator>
		<pubDate>Fri, 12 Aug 2011 08:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://glassocean.net/?p=589#comment-6793</guid>
		<description>this works great! how can I do the same with slugs?</description>
		<content:encoded><![CDATA[<p>this works great! how can I do the same with slugs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sin</title>
		<link>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/comment-page-1/#comment-5884</link>
		<dc:creator>sin</dc:creator>
		<pubDate>Sun, 26 Jun 2011 11:50:32 +0000</pubDate>
		<guid isPermaLink="false">http://glassocean.net/?p=589#comment-5884</guid>
		<description>Hi Perry, this is great little tut!
Is there a way to use this function, but to get reversed output of categories?
For example, Im getting now it now ordered by name?</description>
		<content:encoded><![CDATA[<p>Hi Perry, this is great little tut!<br />
Is there a way to use this function, but to get reversed output of categories?<br />
For example, Im getting now it now ordered by name?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Perry</title>
		<link>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/comment-page-1/#comment-1760</link>
		<dc:creator>Perry</dc:creator>
		<pubDate>Thu, 04 Nov 2010 21:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://glassocean.net/?p=589#comment-1760</guid>
		<description>Laura, you pose a useful question. What we need to do is modify the function above to exclude certain categories. 

Here&#039;s the rewritten function:

&lt;pre&gt;
function user_the_categories() {
    // get all categories for this post
    global $cats;
    $cats = get_the_category();
    // get all of the category names from $cats
    global $catnames;
    // iterate through each category in $cats
    for ($i = 0; $i &lt; count($cats); $i++) {
        // get the catname for this category
        $catname = $cats[$i]-&gt;cat_name;
        // add the catname to the $catnames array as the key AND value
        $catnames[$catname] = $catname;
    }
    // remove any unwanted categories from $catnames by using unset
    unset($catnames[&quot;Blog&quot;]);
    // rebuild the array after using unset (important)
    $catnames = array_values($catnames);
    // iterate through the remaining categories in $catnames
    for ($i = 0; $i &lt; count($catnames); $i++) {
        // echo this category
        echo $catnames[$i];
        // if there are more categories remaining, echo a comma separator
        if ($i + 1 != count($catnames)) {echo &#039;, &#039;;}
    }
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Laura, you pose a useful question. What we need to do is modify the function above to exclude certain categories. </p>
<p>Here&#8217;s the rewritten function:</p>
<pre>
function user_the_categories() {
    // get all categories for this post
    global $cats;
    $cats = get_the_category();
    // get all of the category names from $cats
    global $catnames;
    // iterate through each category in $cats
    for ($i = 0; $i < count($cats); $i++) {
        // get the catname for this category
        $catname = $cats[$i]->cat_name;
        // add the catname to the $catnames array as the key AND value
        $catnames[$catname] = $catname;
    }
    // remove any unwanted categories from $catnames by using unset
    unset($catnames["Blog"]);
    // rebuild the array after using unset (important)
    $catnames = array_values($catnames);
    // iterate through the remaining categories in $catnames
    for ($i = 0; $i < count($catnames); $i++) {
        // echo this category
        echo $catnames[$i];
        // if there are more categories remaining, echo a comma separator
        if ($i + 1 != count($catnames)) {echo ', ';}
    }
}
</pre>
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laura</title>
		<link>http://glassocean.net/how-to-use-the_category-tag-without-links-in-wordpress/comment-page-1/#comment-1662</link>
		<dc:creator>Laura</dc:creator>
		<pubDate>Fri, 29 Oct 2010 22:25:16 +0000</pubDate>
		<guid isPermaLink="false">http://glassocean.net/?p=589#comment-1662</guid>
		<description>Perry, thank you sooo much for this!!! I looked high and low for a way to get my categories to show without hyperlinks. How would you exclude multiple categories in this listing? Thanks in advance!

Laura</description>
		<content:encoded><![CDATA[<p>Perry, thank you sooo much for this!!! I looked high and low for a way to get my categories to show without hyperlinks. How would you exclude multiple categories in this listing? Thanks in advance!</p>
<p>Laura</p>
]]></content:encoded>
	</item>
</channel>
</rss>

