<?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>SEO Software Solutions - Internet Madman &#187; Category</title>
	<atom:link href="http://blog.internetmadman.com/tag/category/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.internetmadman.com</link>
	<description>SEO, Software, Code &#38; Web Hotness</description>
	<lastBuildDate>Wed, 21 Sep 2011 20:35:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Display Category Name in WordPress But Not on a page.</title>
		<link>http://blog.internetmadman.com/display-category-name-in-wordpress-but-not-on-a-page/318</link>
		<comments>http://blog.internetmadman.com/display-category-name-in-wordpress-but-not-on-a-page/318#comments</comments>
		<pubDate>Tue, 02 Mar 2010 17:57:44 +0000</pubDate>
		<dc:creator>Internet Madman</dc:creator>
				<category><![CDATA[WordPress Tips & Tricks]]></category>
		<category><![CDATA[Categories]]></category>
		<category><![CDATA[Category]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.internetmadman.com/?p=318</guid>
		<description><![CDATA[If you are like me, you probably want your website to have excellent navigation, and let people know where they are on your website pretty much all the time. SO I WAS LOOKING FOR A WAY TO DISPLAY SOME INFORMATION &#8230; <a href="http://blog.internetmadman.com/display-category-name-in-wordpress-but-not-on-a-page/318">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.internetmadman.com%2Fdisplay-category-name-in-wordpress-but-not-on-a-page%2F318"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.internetmadman.com%2Fdisplay-category-name-in-wordpress-but-not-on-a-page%2F318&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you are like me, you probably want your website to have excellent navigation, and let people know where they are on your website pretty much all the time.</p>
<p>SO I WAS LOOKING FOR A WAY TO DISPLAY SOME INFORMATION LIKE CATEGORY NAME IN WORDPRESS (to be a header for an ordered list of that category&#8217;s other posts.) That topic will be covered later by the way.<br />
 <script type="text/javascript"><!--
google_ad_client = "pub-1072293186877500";
/* 300x250, created 11/2/09 */
google_ad_slot = "2194248652";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
So I made it happen, but then my Word Press pages were showing the header for the category &#8216;uncategorized&#8217; (Not cool!)</p>
<p>Here&#8217;s a good way to show the header on all pages except your main web pages.</p>
<p><code><?php<br />
global $post;<br />
$category = get_the_category();<br />
if ( is_page()  ) {<br />
}<br />
else{<br />
echo 'Posting Filed in ' .$category[0]->cat_name;<br />
}<br />
?></code></p>
<p><strong>***UPDATE***</strong></p>
<p>The above code works great, but unfortunately I just noticed that it still shows up even if there are no posts in that category. That&#8217;s fine because I am using that page as an index page, and there aren&#8217;t supposed to be &#8216;POSTS&#8217; in that category, however just having a header hanging out there is kind of stupid (that&#8217;s what I&#8217;m using this code for, a header in a widgetized sidebar)</p>
<p>Use this PHP instead&#8230;</p>
<p><code><?php<br />
global $post;<br />
$category = get_the_category();<br />
if ( is_page()  ) {<br />
}<br />
else{<br />
if ( have_posts()  ) {<br />
echo $category[0]->cat_name;<br />
}<br />
}<br />
?><br />
</code></p>
<div class="su-linkbox" id="post-318-linkbox"><div class="su-linkbox-label">Link to this post!</div><div class="su-linkbox-field"><input type="text" value="&lt;a href=&quot;http://blog.internetmadman.com/display-category-name-in-wordpress-but-not-on-a-page/318&quot;&gt;Display Category Name in WordPress But Not on a page.&lt;/a&gt;" onclick="javascript:this.select()" readonly="readonly" style="width: 100%;" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.internetmadman.com/display-category-name-in-wordpress-but-not-on-a-page/318/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

