<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: Add Category title to single page, category page</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Wed, 19 Jun 2013 09:30:54 +0000</pubDate>

<item>
<title>helgatheviking on "Add Category title to single page, category page"</title>
<link>http://themeshaper.com/forums/topic/add-category-title-to-single-page-category-page#post-27142</link>
<pubDate>Fri, 25 May 2012 21:05:39 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">27142@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;not a thematic question, in theory you don't do a foreach and just grab the first item in the array, using array notation  &#60;/p&#62;
&#60;p&#62;let me google that for you:&#60;br /&#62;
&#60;a href=&#34;http://lmgtfy.com/?q=how+to+show+first+category+in+wordpress&#34; rel=&#34;nofollow&#34;&#62;http://lmgtfy.com/?q=how+to+show+first+category+in+wordpress&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;read the first result.&#60;/p&#62;
&#60;p&#62;you should consider why you are putting things in multiple categories.  if you need that type of categorization, you might want to consider using tags.
&#60;/p&#62;</description>
</item>
<item>
<title>gillispj on "Add Category title to single page, category page"</title>
<link>http://themeshaper.com/forums/topic/add-category-title-to-single-page-category-page#post-27140</link>
<pubDate>Fri, 25 May 2012 20:56:16 +0000</pubDate>
<dc:creator>gillispj</dc:creator>
<guid isPermaLink="false">27140@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;This works perfectly for, how ever I am wondering if there is a way to limit the amount of categories that show up?  For example I would like for only the the first cat to show.
&#60;/p&#62;</description>
</item>
<item>
<title>Jonny Janiero on "Add Category title to single page, category page"</title>
<link>http://themeshaper.com/forums/topic/add-category-title-to-single-page-category-page#post-18985</link>
<pubDate>Sat, 05 Feb 2011 00:56:19 +0000</pubDate>
<dc:creator>Jonny Janiero</dc:creator>
<guid isPermaLink="false">18985@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;hmmm...&#60;br /&#62;
have you tried&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if (!is_archive()) {&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;other than that, can't you just specify&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if (is_single() &#124;&#124; is_category()) {&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;hope this helps
&#60;/p&#62;</description>
</item>
<item>
<title>wlanni on "Add Category title to single page, category page"</title>
<link>http://themeshaper.com/forums/topic/add-category-title-to-single-page-category-page#post-18967</link>
<pubDate>Fri, 04 Feb 2011 10:29:58 +0000</pubDate>
<dc:creator>wlanni</dc:creator>
<guid isPermaLink="false">18967@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I'm working on a site where content is being filtered throughout the site using categories. The site owners are going to want to use a category as a blog, but then we're also using categories to filter out &#34;news and announcements&#34; and &#34;featured home page items.&#34;&#60;/p&#62;
&#60;p&#62;In order to make sure it's really clear where a user is, then, I needed to add the category title to the category page, and the single post page. However, I did not want it to appear in the date archive.&#60;/p&#62;
&#60;p&#62;&#60;em&#62;By the way, I'm using WordPress' built in navigation menu, so in order to point to a category page, all I did was add the category to the menu. Bam. Done. (unfortunately this means I couldn't set up a template page for the category easily, but oh well).&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;I attached this to the navigation above, as that was the only hook I could find that appeared on the pages I wanted these titles to show up on.&#60;/p&#62;
&#60;p&#62;Here's the code (most of which is grabbed from wordpress codex and forum):&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;//put blogtitle onto a single page
function blogtitle_on_single_page() {
	if (!is_date()) {
?&#38;gt;
	&#38;lt;h1&#38;gt;&#38;lt;?php $categories = get_the_category(); foreach($categories as $category) {
     $cat_name = $category-&#38;gt;name;
     if($cat_name != &#38;#39;featured&#38;#39;) echo &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;.get_category_link($category-&#38;gt;term_id).&#38;#39;&#38;quot;&#38;gt;&#38;#39;.$cat_name . &#38;#39;&#38;lt;/a&#38;gt; &#38;#39;; }
    ?&#38;gt;&#38;lt;/h1&#38;gt;
&#38;lt;?php }
}
add_action(&#38;#39;thematic_navigation_above&#38;#39;,&#38;#39;blogtitle_on_single_page&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>

</channel>
</rss>
