<?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 a different layout for a certain page?</title>
	<atom:link href="http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/feed/" rel="self" type="application/rss+xml" />
	<link>http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/</link>
	<description>Code Snippets and more ...</description>
	<lastBuildDate>Wed, 21 Sep 2011 08:20:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: nicobr22</title>
		<link>http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/comment-page-1/#comment-109</link>
		<dc:creator>nicobr22</dc:creator>
		<pubDate>Fri, 24 Jun 2011 14:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://programming.thematic4you.com/?p=6#comment-109</guid>
		<description>Hi,

Thanks, I was looking for this.

Also, I found another way to do this. With this you don&#039;t need to create two .css files, and don&#039;t need the @import code on the .css file neither. Just paste the following code in the functions.php file:

&lt;code&gt;
function childtheme_create_stylesheet() {
    $templatedir = get_bloginfo(&#039;template_directory&#039;);
    $stylesheetdir = get_bloginfo(&#039;stylesheet_directory&#039;);
	if (is_home() &#124;&#124; is_front_page()) {
		?&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/reset.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/typography.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/images.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/layouts/3c-fixed.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/default.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/plugins.css&quot; /&gt;
 
		
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/reset.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/typography.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/images.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/layouts/2c-r-fixed.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/default.css&quot; /&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/plugins.css&quot; /&gt;
 
		&lt;?php
	}
}
add_filter(&#039;thematic_create_stylesheet&#039;, &#039;childtheme_create_stylesheet&#039;);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks, I was looking for this.</p>
<p>Also, I found another way to do this. With this you don&#8217;t need to create two .css files, and don&#8217;t need the @import code on the .css file neither. Just paste the following code in the functions.php file:</p>
<p><code><br />
function childtheme_create_stylesheet() {<br />
    $templatedir = get_bloginfo('template_directory');<br />
    $stylesheetdir = get_bloginfo('stylesheet_directory');<br />
	if (is_home() || is_front_page()) {<br />
		?&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/reset.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/typography.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/images.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/layouts/3c-fixed.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/default.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/plugins.css" /&gt;</p>
<p>		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/reset.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/typography.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/images.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/layouts/2c-r-fixed.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/default.css" /&gt;<br />
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/library/styles/plugins.css" /&gt;</p>
<p>		&lt;?php<br />
	}<br />
}<br />
add_filter(&#039;thematic_create_stylesheet&#039;, &#039;childtheme_create_stylesheet&#039;);<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Turner</title>
		<link>http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/comment-page-1/#comment-107</link>
		<dc:creator>Greg Turner</dc:creator>
		<pubDate>Fri, 17 Jun 2011 03:54:17 +0000</pubDate>
		<guid isPermaLink="false">http://programming.thematic4you.com/?p=6#comment-107</guid>
		<description>I wanted to be able to have the user be able to define a layout on a per page basis.  To do that, I added a custom field that is set in the admin edit page, and the value of this custom field tells what layout should be used,

I copied the thematic style.css file as the main style sheet for my child theme and took out the reference to the style sheet for the layout.

Then I created a function in the functions.php and hooked it into the wp_head action hook.  In that function, I get the value of the custom field, and output a reference to the correct layout style sheet from thematic.

Comments on this method??  Any better way to do it?  Thanks</description>
		<content:encoded><![CDATA[<p>I wanted to be able to have the user be able to define a layout on a per page basis.  To do that, I added a custom field that is set in the admin edit page, and the value of this custom field tells what layout should be used,</p>
<p>I copied the thematic style.css file as the main style sheet for my child theme and took out the reference to the style sheet for the layout.</p>
<p>Then I created a function in the functions.php and hooked it into the wp_head action hook.  In that function, I get the value of the custom field, and output a reference to the correct layout style sheet from thematic.</p>
<p>Comments on this method??  Any better way to do it?  Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Kerns</title>
		<link>http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/comment-page-1/#comment-104</link>
		<dc:creator>John Kerns</dc:creator>
		<pubDate>Thu, 16 Jun 2011 01:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://programming.thematic4you.com/?p=6#comment-104</guid>
		<description>Thanks for the instructions; they worked perfectly. Incidentally, you could more-or-less cut my_stylesheet() to half it&#039;s length by omitting the else clause, since all it does it set $content to the same value it already has.</description>
		<content:encoded><![CDATA[<p>Thanks for the instructions; they worked perfectly. Incidentally, you could more-or-less cut my_stylesheet() to half it&#8217;s length by omitting the else clause, since all it does it set $content to the same value it already has.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Paul Janze</title>
		<link>http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/comment-page-1/#comment-86</link>
		<dc:creator>Jon Paul Janze</dc:creator>
		<pubDate>Sun, 13 Mar 2011 15:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://programming.thematic4you.com/?p=6#comment-86</guid>
		<description>This is perfect! Exactly what I was looking for. In case anyone else is trying to do the same, I needed to have a different layout for home page as well as adding an extra large image to the home page. I used your example exactly plus an extra conditional statement in my functions.php to add an extra  to thematic header to get the desired effect.
&lt;code&gt;

// Function to add HomeImage below #Access div
function Add_Home_Image(){ 
	// We test if we&#039;re on home or on your frontpage
  	if (is_home() &#124;&#124; is_front_page()) {?&gt;
		
		&lt;?php
	}
}
add_action(&#039;thematic_header&#039;,&#039;Add_Home_Image&#039;, 10);
&lt;/code&gt;

(I even cut and pasted your conditional into my simple function :)</description>
		<content:encoded><![CDATA[<p>This is perfect! Exactly what I was looking for. In case anyone else is trying to do the same, I needed to have a different layout for home page as well as adding an extra large image to the home page. I used your example exactly plus an extra conditional statement in my functions.php to add an extra  to thematic header to get the desired effect.<br />
<code></p>
<p>// Function to add HomeImage below #Access div<br />
function Add_Home_Image(){<br />
	// We test if we're on home or on your frontpage<br />
  	if (is_home() || is_front_page()) {?&gt;</p>
<p>		&lt;?php<br />
	}<br />
}<br />
add_action(&#039;thematic_header&#039;,&#039;Add_Home_Image&#039;, 10);<br />
</code></p>
<p>(I even cut and pasted your conditional into my simple function <img src='http://programming.thematic4you.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: will forsyth</title>
		<link>http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/comment-page-1/#comment-54</link>
		<dc:creator>will forsyth</dc:creator>
		<pubDate>Thu, 24 Jun 2010 13:26:19 +0000</pubDate>
		<guid isPermaLink="false">http://programming.thematic4you.com/?p=6#comment-54</guid>
		<description>Thanks alot for this.  Will have to give it a go on my site. Should help with pemalinks and SEO if I dont have HTMl pages linked to my blog which is what I have currently.


Does this technique work only with the front page being different. What would change in the function code to have more than one page effected by the first style sheet?

I.E

Pages 1 -5 style sheet 1
Pages 6 -10 style sheet 2

Thanks for the article</description>
		<content:encoded><![CDATA[<p>Thanks alot for this.  Will have to give it a go on my site. Should help with pemalinks and SEO if I dont have HTMl pages linked to my blog which is what I have currently.</p>
<p>Does this technique work only with the front page being different. What would change in the function code to have more than one page effected by the first style sheet?</p>
<p>I.E</p>
<p>Pages 1 -5 style sheet 1<br />
Pages 6 -10 style sheet 2</p>
<p>Thanks for the article</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Brown</title>
		<link>http://programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/comment-page-1/#comment-11</link>
		<dc:creator>Jeremy Brown</dc:creator>
		<pubDate>Sun, 07 Feb 2010 21:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://programming.thematic4you.com/?p=6#comment-11</guid>
		<description>Interesting; I managed to do it while importing the original Thematic CSS by finagling with margins to push the secondary div to where the left column would be and using display:none on posts and pages.</description>
		<content:encoded><![CDATA[<p>Interesting; I managed to do it while importing the original Thematic CSS by finagling with margins to push the secondary div to where the left column would be and using display:none on posts and pages.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

