<?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: Set up custom single.php</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Thu, 20 Jun 2013 09:36:34 +0000</pubDate>

<item>
<title>helgatheviking on "Set up custom single.php"</title>
<link>http://themeshaper.com/forums/topic/set-up-custom-singlephp#post-26131</link>
<pubDate>Mon, 02 Apr 2012 15:03:10 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">26131@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;try:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;template_redirect&#38;#39;, &#38;#39;kia_template&#38;#39;);

function kia_template() {
	if ( is_single() &#38;#38;&#38;#38; in_category(&#38;#39;foo&#38;#39;){
		include (get_stylesheet_directory() . &#38;#39;/single-foo.php&#38;#39;);
		exit();
    } else if ( is_single() &#38;#38;&#38;#38; in_category(&#38;#39;bar&#38;#39;) {
		include (get_stylesheet_directory() . &#38;#39;/single-bar.php&#38;#39;);
		exit();
    }
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>sowingseeds on "Set up custom single.php"</title>
<link>http://themeshaper.com/forums/topic/set-up-custom-singlephp#post-26115</link>
<pubDate>Sat, 31 Mar 2012 08:46:33 +0000</pubDate>
<dc:creator>sowingseeds</dc:creator>
<guid isPermaLink="false">26115@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I suspect that TEMPLATEPATH relates to the Thematic directory not to the Child Theme directory?
&#60;/p&#62;</description>
</item>
<item>
<title>lastraw on "Set up custom single.php"</title>
<link>http://themeshaper.com/forums/topic/set-up-custom-singlephp#post-26112</link>
<pubDate>Fri, 30 Mar 2012 22:50:14 +0000</pubDate>
<dc:creator>lastraw</dc:creator>
<guid isPermaLink="false">26112@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I also would like to have different single.php for different categories. It seems like it can be done with something like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
  $post = $wp_query-&#38;gt;post;

  if (in_category(&#38;#39;1&#38;#39;)) {
      include(TEMPLATEPATH.&#38;#39;/single1.php&#38;#39;);
  } elseif (in_category(&#38;#39;2&#38;#39;)) {
      include(TEMPLATEPATH.&#38;#39;/single2.php&#38;#39;);
  } else {
      include(TEMPLATEPATH.&#38;#39;/single_default.php&#38;#39;);
  }
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;a href=&#34;http://www.wprecipes.com/how-to-use-different-single-template-per-category&#34; rel=&#34;nofollow&#34;&#62;http://www.wprecipes.com/how-to-use-different-single-template-per-category&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;but I can't make it work.
&#60;/p&#62;</description>
</item>
<item>
<title>helgatheviking on "Set up custom single.php"</title>
<link>http://themeshaper.com/forums/topic/set-up-custom-singlephp#post-18912</link>
<pubDate>Wed, 02 Feb 2011 20:48:23 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">18912@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;i'm not sure what is going on w/ your template attempt.  my guess (and i can't really see the diagram well at the codex) is that single pages just aren't supported in the way you are attempting.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://codex.wordpress.org/Template_Hierarchy&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Template_Hierarchy&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;why not take the functions approach:&#60;br /&#62;
&#60;a href=&#34;http://themeshaper.com/forums/topic/remove-sidebar&#34; rel=&#34;nofollow&#34;&#62;http://themeshaper.com/forums/topic/remove-sidebar&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>Mike_sa on "Set up custom single.php"</title>
<link>http://themeshaper.com/forums/topic/set-up-custom-singlephp#post-18907</link>
<pubDate>Wed, 02 Feb 2011 20:06:21 +0000</pubDate>
<dc:creator>Mike_sa</dc:creator>
<guid isPermaLink="false">18907@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi &#60;/p&#62;
&#60;p&#62;I am trying to set up a custom single.php file for a specific category.&#60;br /&#62;
I understood that Thematic theme would look for a slug relating to the post first.&#60;/p&#62;
&#60;p&#62;The category slug is recent-projects . I have created the file single-recent-projects.php and have saved the file to the childtheme. &#60;/p&#62;
&#60;p&#62;When viewing a single post from this category it is not using the single-recent-projects.php  file. I am only wanting to remove the sidebar for this category post and leave the side bar for all the other category posts. &#60;/p&#62;
&#60;p&#62;Am I supposed to activate the custom single file somehow? &#60;/p&#62;
&#60;p&#62;I have been trying all sorts of things now for hours and none work. I can't just comment the sidebar out in the main single.php file because I need it for other post categories. &#60;/p&#62;
&#60;p&#62;Help please :)
&#60;/p&#62;</description>
</item>

</channel>
</rss>
