<?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: How do I define a custom CSS file per page template?</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Thu, 09 Feb 2012 04:29:55 +0000</pubDate>

<item>
<title>helgatheviking on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-22683</link>
<pubDate>Sat, 13 Aug 2011 13:14:02 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">22683@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;the code should probably not say path as in this instance it actually means URL and not absolute path.  &#60;/p&#62;
&#60;p&#62;your_function like ALL functions you find on these boards go in your CHILD'S functions.php&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;define(&#38;#39;CHILDTHEME&#38;#39;, get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;));

add_action(&#38;#39;wp_head&#38;#39;,&#38;#39;your_function&#38;#39;,1);

function your_function(){
    if(!is_admin()){   /* to prevent  the loading of your stylesheet in the admin*/
        if(is_front_page()){   /* to load a stylesheet for your front page */
            wp_enqueue_style(&#38;#39;front_style&#38;#39;, CHILDTHEME . &#38;#39;/front-style.css&#38;#39;);
        }else{
            wp_enqueue_style(&#38;#39;normal_style&#38;#39;, CHILDTHEME . &#38;#39;/style.css&#38;#39;);
        }
    }
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;the caps CHILDTHEME is a php constant.  i always use constants for the different folders in my theme so that if i ever change the file structure i only need to change the reference in one place.  but you aren't obliged to use it.  &#60;/p&#62;
&#60;p&#62;if you are still confused on the subject please read:&#60;br /&#62;
programming.thematic4you.com/2010/01/how-to-use-a-different-layout-for-a-certain-page/&#60;/p&#62;
&#60;p&#62;idk if there is a benefit, per se, but doing everything via functions is just sort of the child-theme approach.  it keeps everything centralized.
&#60;/p&#62;</description>
</item>
<item>
<title>akmiecik on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-22682</link>
<pubDate>Sat, 13 Aug 2011 11:44:48 +0000</pubDate>
<dc:creator>akmiecik</dc:creator>
<guid isPermaLink="false">22682@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;your_function = function.php in child template folder?&#60;br /&#62;
could you give examples of the following:&#60;br /&#62;
front_style&#60;br /&#62;
path to your stylesheet&#60;br /&#62;
normal_style&#60;br /&#62;
path to your other stylesheet&#60;/p&#62;
&#60;p&#62;Thanks&#60;/p&#62;
&#60;p&#62;oh, is there a benefit to doing the function vs. a unique template with the CSS hardcoded as vivalet did?&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
I created a template that called&#60;br /&#62;
&#38;lt;?php get_header('alt') ?&#38;gt;&#60;/p&#62;
&#60;p&#62;and made a file called header-alt.php&#60;/p&#62;
&#60;p&#62;this is a copy of the thematic header.php but I made the following change. I commented out the call to thematic_create_stylesheet(); and hard coded the alternate style sheet.&#60;/p&#62;
&#60;p&#62;//thematic_create_stylesheet();&#60;br /&#62;
?&#38;gt;&#60;br /&#62;
&#38;lt;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; href=&#34;http://www.website.com/bk/wp-content/themes/thematicpowerblog/style-alt.css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;?php
&#60;/p&#62;&#60;/blockquote&#62;</description>
</item>
<item>
<title>helgatheviking on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-22676</link>
<pubDate>Sat, 13 Aug 2011 05:00:52 +0000</pubDate>
<dc:creator>helgatheviking</dc:creator>
<guid isPermaLink="false">22676@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;that's a bit vague.  what do you want to know?
&#60;/p&#62;</description>
</item>
<item>
<title>akmiecik on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-22667</link>
<pubDate>Sat, 13 Aug 2011 01:31:49 +0000</pubDate>
<dc:creator>akmiecik</dc:creator>
<guid isPermaLink="false">22667@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Would it be possible to get a bit more instruction on the code?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>eduplessis on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-20748</link>
<pubDate>Thu, 21 Apr 2011 14:06:10 +0000</pubDate>
<dc:creator>eduplessis</dc:creator>
<guid isPermaLink="false">20748@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;for loading different stylesheet per page&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;wp_head&#38;#39;,&#38;#39;your_function&#38;#39;,1);

function your_function(){
    if(!is_admin()){   /* to prevent  the loading of your stylesheet in the admin*/
        if(is_front_page()){   /* to load a stylesheet for your front page */
            wp_enqueue_style(&#38;#39;front_style&#38;#39;, &#38;#39;path to your stylesheet&#38;#39;);
        }else{
            wp_enqueue_style(&#38;#39;normal_style&#38;#39;, &#38;#39;path to your other stylesheet&#38;#39;);
        }
    }
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>blitz on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-7182</link>
<pubDate>Thu, 15 Oct 2009 17:05:07 +0000</pubDate>
<dc:creator>blitz</dc:creator>
<guid isPermaLink="false">7182@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Really interesting and useful post. However…&#60;/p&#62;
&#60;p&#62;Not a problem to do with the code at all, but a quirk I've found. I need to have a different background jpeg on each page.&#60;/p&#62;
&#60;p&#62;The graphic is attached to #main - which is in the header.php. I used the &#38;lt;?php get_header('alt') ?&#38;gt; (thanks vivalet) code to pull up a new header and tried two things, #mainalt, (and a style for this) which did not work - well it did, but the background image only repeats horizontally! and also #main with an alt class. This did not work either.&#60;/p&#62;
&#60;p&#62;Anyone come across this - or a way to use a custom background tile in the #main (alternative template) tag?
&#60;/p&#62;</description>
</item>
<item>
<title>vivalet on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-4881</link>
<pubDate>Thu, 02 Jul 2009 16:41:37 +0000</pubDate>
<dc:creator>vivalet</dc:creator>
<guid isPermaLink="false">4881@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;My solution to this was the following:&#60;/p&#62;
&#60;p&#62;I created a template that called&#60;br /&#62;
&#38;lt;?php get_header('alt') ?&#38;gt;&#60;/p&#62;
&#60;p&#62;and made a file called header-alt.php&#60;/p&#62;
&#60;p&#62;this is a copy of the thematic header.php but I made the following change.  I commented out the call to thematic_create_stylesheet(); and hard coded the alternate style sheet.  &#60;/p&#62;
&#60;p&#62;//thematic_create_stylesheet();&#60;br /&#62;
?&#38;gt;&#60;br /&#62;
&#38;lt;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; href=&#34;http://www.website.com/bk/wp-content/themes/thematicpowerblog/style-alt.css&#34; /&#38;gt;&#60;br /&#62;
&#38;lt;?php &#60;/p&#62;
&#60;p&#62;In the future would it be possible for thematic_create_stylesheet to accept an argument so that it could call style-alt.css&#60;/p&#62;
&#60;p&#62;for instance a special header-alt.php could call thematic_create_stylesheet('alt') and then the file style-alt.css would be called instead of style.css&#60;/p&#62;
&#60;p&#62;thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>walkingpaper on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2292</link>
<pubDate>Fri, 13 Mar 2009 20:55:50 +0000</pubDate>
<dc:creator>walkingpaper</dc:creator>
<guid isPermaLink="false">2292@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;this is great!  any idea how to turn this into a CSS selector?&#60;/p&#62;
&#60;p&#62;i'd love to have two links, one loading default.css and the other loading alternative.css.&#60;/p&#62;
&#60;p&#62;PS.  i went live with my thematic theme!  walkingpaper . org
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2258</link>
<pubDate>Thu, 12 Mar 2009 23:53:02 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2258@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Careful there Chris! ;)
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2257</link>
<pubDate>Thu, 12 Mar 2009 23:50:44 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">2257@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Tested with no alternate.css before.. got a none CSS display and said 'Ok .. It'll work if alternate.css is there' .. *SMACK*
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2256</link>
<pubDate>Thu, 12 Mar 2009 23:50:09 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2256@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Yes! Hoorah! You did it.&#60;/p&#62;
&#60;p&#62;Here is the fixed code for posterity:&#60;/p&#62;
&#60;p&#62;To load a custom CSS stylesheet on a single page:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_stylesheet($content) {
  global $wp_query;
  if (is_page()) {
    $pageID = $wp_query-&#38;gt;post-&#38;gt;ID;
    if ($pageID == &#38;#39;332&#38;#39;) {
        $content = &#38;quot;\t&#38;quot;;
        $content .= &#38;quot;&#38;lt;link rel=\&#38;quot;stylesheet\&#38;quot; type=\&#38;quot;text/css\&#38;quot; href=\&#38;quot;&#38;quot;;
        $content .= get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;) . &#38;quot;/alternate.css&#38;quot;;
        $content .= &#38;quot;\&#38;quot; /&#38;gt;&#38;quot;;
        $content .= &#38;quot;\n\n&#38;quot;;
        }
    }
    return $content;
}
add_filter (&#38;#39;thematic_create_stylesheet&#38;#39;, &#38;#39;my_stylesheet&#38;#39;)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;To load a custom CSS stylesheet on multiple pages:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_stylesheet($content) {
  global $wp_query;
  if (is_page()) {
    $pageID = $wp_query-&#38;gt;post-&#38;gt;ID;
    $pagelist = array(&#38;#39;332&#38;#39;,&#38;#39;333&#38;#39;,&#38;#39;334&#38;#39;);
    if (in_array($pageID, $pagelist)) {
        $content = &#38;quot;\t&#38;quot;;
        $content .= &#38;quot;&#38;lt;link rel=\&#38;quot;stylesheet\&#38;quot; type=\&#38;quot;text/css\&#38;quot; href=\&#38;quot;&#38;quot;;
        $content .= get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;) . &#38;quot;/alternate.css&#38;quot;;
        $content .= &#38;quot;\&#38;quot; /&#38;gt;&#38;quot;;
        $content .= &#38;quot;\n\n&#38;quot;;
        }
    }
    return $content;
}
add_filter (&#38;#39;thematic_create_stylesheet&#38;#39;, &#38;#39;my_stylesheet&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Chris on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2255</link>
<pubDate>Thu, 12 Mar 2009 23:46:52 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">2255@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Now I had such a moment .. &#60;/p&#62;
&#60;p&#62;please change the line&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$content .= STYLESHEETPATH . &#38;#39;/alternate.css&#38;#39;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;into&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$content .= get_bloginfo(&#38;#39;stylesheet_directory&#38;#39;) . &#38;quot;/alternate.css&#38;quot;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then it should work .. just tested it with the standard Thematic CSS and the Second to None CSS for just one page .. looks great.&#60;/p&#62;
&#60;p&#62;Sorry!&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2253</link>
<pubDate>Thu, 12 Mar 2009 23:35:42 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2253@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;So, the function works only half way...&#60;/p&#62;
&#60;p&#62;The custom style sheet will not load.&#60;/p&#62;
&#60;p&#62;Here is my code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_stylesheet($content) {
  global $wp_query;
  if (is_page()) {
    $pageID = $wp_query-&#38;gt;post-&#38;gt;ID;
    $pagelist = array(&#38;#39;3&#38;#39;,&#38;#39;19&#38;#39;,&#38;#39;20&#38;#39;);
    if (in_array($pageID, $pagelist)) {
        $content = &#38;quot;\t&#38;quot;;
        $content .= &#38;quot;&#38;lt;link rel=\&#38;quot;stylesheet\&#38;quot; type=\&#38;quot;text/css\&#38;quot; href=\&#38;quot;&#38;quot;;
        $content .= STYLESHEETPATH . &#38;#39;/launchpage.css&#38;#39;;
        $content .= &#38;quot;\&#38;quot; /&#38;gt;&#38;quot;;
        $content .= &#38;quot;\n\n&#38;quot;;
        }
    }
    return $content;
}
add_filter (&#38;#39;thematic_create_stylesheet&#38;#39;, &#38;#39;my_stylesheet&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Don't I need to define the stylesheet location?
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2249</link>
<pubDate>Thu, 12 Mar 2009 23:09:04 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2249@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ok, so it is overriding the CSS, but not loading my custom style-sheet.&#60;/p&#62;
&#60;p&#62;Any thoughts?
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2247</link>
<pubDate>Thu, 12 Mar 2009 23:02:41 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">2247@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;@Tom .. if you have only a couple of changes for a certain page or post or whatever the solution we described in the &#60;a href=&#34;http://themeshaper.com/forums/topic/making-a-skittlescom-style-page-template&#34;&#62;Skittles.com&#60;/a&#62; thread is perfect.&#60;/p&#62;
&#60;p&#62;If you want to implement a more complex style change or want to run a certain page with a completely different style it might be better to use the filter as described above.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2246</link>
<pubDate>Thu, 12 Mar 2009 22:55:32 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">2246@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ok changed it a bit ;)&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_stylesheet($content) {
  global $wp_query;
  if (is_page()) {
    $pageID = $wp_query-&#38;gt;post-&#38;gt;ID;
    $pagelist = array(&#38;#39;332&#38;#39;,&#38;#39;333&#38;#39;,&#38;#39;334&#38;#39;);
    if (in_array($pageID, $pagelist)) {
        $content = &#38;quot;\t&#38;quot;;
        $content .= &#38;quot;&#38;lt;link rel=\&#38;quot;stylesheet\&#38;quot; type=\&#38;quot;text/css\&#38;quot; href=\&#38;quot;&#38;quot;;
        $content .= STYLESHEETPATH . &#38;#39;/alternate.css&#38;#39;;
        $content .= &#38;quot;\&#38;quot; /&#38;gt;&#38;quot;;
        $content .= &#38;quot;\n\n&#38;quot;;
        }
    }
    return $content;
}
add_filter (&#38;#39;thematic_create_stylesheet&#38;#39;, &#38;#39;my_stylesheet&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Tested and approved.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>freedimensional on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2242</link>
<pubDate>Thu, 12 Mar 2009 22:44:19 +0000</pubDate>
<dc:creator>freedimensional</dc:creator>
<guid isPermaLink="false">2242@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Will this process work even for those of us using child themes?&#60;/p&#62;
&#60;p&#62;Have just tried as a solution to my &#60;a href=&#34;http://themeshaper.com/forums/topic/making-a-skittlescom-style-page-template&#34;&#62;Skittles.com&#60;/a&#62; problem. It ain't happening for me!&#60;/p&#62;
&#60;p&#62;Thanks a lot!&#60;br /&#62;
Tom
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2241</link>
<pubDate>Thu, 12 Mar 2009 22:14:13 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2241@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Great! Thanks for that.&#60;/p&#62;
&#60;p&#62;Can I define a list of pages that will load the alternate CSS?&#60;/p&#62;
&#60;p&#62;Suppose:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;if ($pageID == &#38;#39;332,333,334&#38;#39;) {&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Would that work?
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2240</link>
<pubDate>Thu, 12 Mar 2009 21:31:02 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">2240@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Don't know if this will be such a moment :-)&#60;/p&#62;
&#60;p&#62;Ok try this one:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function my_stylesheet($content) {
  global $wp_query;
  if (is_page()) {
    $pageID = $wp_query-&#38;gt;post-&#38;gt;ID;
    if ($pageID == &#38;#39;332&#38;#39;) {
        $content = &#38;quot;\t&#38;quot;;
        $content .= &#38;quot;&#38;lt;link rel=\&#38;quot;stylesheet\&#38;quot; type=\&#38;quot;text/css\&#38;quot; href=\&#38;quot;&#38;quot;;
        $content .= STYLESHEETPATH . &#38;#39;/alternate.css&#38;#39;;
        $content .= &#38;quot;\&#38;quot; /&#38;gt;&#38;quot;;
        $content .= &#38;quot;\n\n&#38;quot;;
        }
    }
    return $content;
}
add_filter (&#38;#39;thematic_create_stylesheet&#38;#39;, &#38;#39;my_stylesheet&#38;#39;)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Copy &#38;#38; paste this snippet into your child theme's functions.php. Change the page-id to the one of your special page and change the name of the CSS file. If a standard page is loaded the style.css will be loaded. if your special page is loaded only the alternate.css will be loaded.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2239</link>
<pubDate>Thu, 12 Mar 2009 21:02:34 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2239@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Yes, that is exactly what I am trying to do. I should know how to do it...but have never needed to, so I don't know how. :)&#60;/p&#62;
&#60;p&#62;I am anticipating a forehead smack moment here...
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2238</link>
<pubDate>Thu, 12 Mar 2009 20:57:45 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">2238@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hey Nick,&#60;/p&#62;
&#60;p&#62;would it be an option to have your standard style.css and load and alternative.css just for this one page? Means instead of loading the style.css you would load alternative.css for the one page that is different from the others.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2237</link>
<pubDate>Thu, 12 Mar 2009 20:47:44 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2237@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hmm...I am having issues with the imported CSS layout overriding the #container I am trying to style.&#60;/p&#62;
&#60;p&#62;Can I drop the imports for one page template, and have the imports for the rest of the pages?
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2233</link>
<pubDate>Thu, 12 Mar 2009 17:52:59 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2233@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Ok thanks...That helps a lot
&#60;/p&#62;</description>
</item>
<item>
<title>Ian Stewart on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2232</link>
<pubDate>Thu, 12 Mar 2009 17:52:48 +0000</pubDate>
<dc:creator>Ian Stewart</dc:creator>
<guid isPermaLink="false">2232@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Check out the body tag for my theme store page on ThemeShaper:&#60;/p&#62;
&#60;p&#62;&#38;lt;body class=&#34;wordpress y2009 m03 d12 h12 slug-theme-store page pageid-1268 page-author-ian-stewart &#60;strong&#62;page-template page-template-shop-php&#60;/strong&#62; loggedin mac firefox ff3&#34;&#38;gt;&#60;/p&#62;
&#60;p&#62;If I want to target CSS edits for that page template (shop.php) I can modify CSS like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;a { color:blue; }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;by using something like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;.page-template-shop-php a { color:red; }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So instead of having blue anchors, like all my other pages, pages using the shop.php template will have red anchors.
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2231</link>
<pubDate>Thu, 12 Mar 2009 17:31:09 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2231@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Sorry, you lost me there. Long hand please... :)
&#60;/p&#62;</description>
</item>
<item>
<title>Ian Stewart on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2230</link>
<pubDate>Thu, 12 Mar 2009 17:20:23 +0000</pubDate>
<dc:creator>Ian Stewart</dc:creator>
<guid isPermaLink="false">2230@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;you can do this by targeting the body class for that template: .your-template-php.
&#60;/p&#62;</description>
</item>
<item>
<title>Nick on "How do I define a custom CSS file per page template?"</title>
<link>http://themeshaper.com/forums/topic/how-do-i-define-a-custom-css-file-per-page-template#post-2229</link>
<pubDate>Thu, 12 Mar 2009 16:59:14 +0000</pubDate>
<dc:creator>Nick</dc:creator>
<guid isPermaLink="false">2229@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I am setting up a site that requires a custom page template including a completely custom CSS styling for that one page. How do I define that custom CSS within that one template? &#60;/p&#62;
&#60;p&#62;I need to override my main CSS styling and load a totally different styling. I think there is a way to do this...but how?
&#60;/p&#62;</description>
</item>

</channel>
</rss>

