<?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: Add a Category and Page Specific Class to the Body Tag in WordPress</title>
	<atom:link href="http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/</link>
	<description>Web Design &#38; Development Blog</description>
	<lastBuildDate>Sun, 05 Feb 2012 13:30:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: veerendra</title>
		<link>http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/#comment-24794</link>
		<dc:creator>veerendra</dc:creator>
		<pubDate>Sat, 04 Sep 2010 22:42:50 +0000</pubDate>
		<guid isPermaLink="false">http://tkenny.co.uk/inspectelement/?p=231#comment-24794</guid>
		<description>Thank you so much for this discussion. 
@otto : I tried your trick and its working well 

Thanks to all.</description>
		<content:encoded><![CDATA[<p>Thank you so much for this discussion.<br />
@otto : I tried your trick and its working well </p>
<p>Thanks to all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darrin</title>
		<link>http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/#comment-20330</link>
		<dc:creator>darrin</dc:creator>
		<pubDate>Wed, 02 Jun 2010 20:41:49 +0000</pubDate>
		<guid isPermaLink="false">http://tkenny.co.uk/inspectelement/?p=231#comment-20330</guid>
		<description>I actually recently wrote an article that addresses this very thing.  I wrote a small script that dynamically adds an id to the body element.  It takes the same parameters as WP&#039;s core body_class() function.

You can check the article out here:
http://darrinb.com/notes/2010/adding-a-custom-id-to-the-body-element-in-wordpress/</description>
		<content:encoded><![CDATA[<p>I actually recently wrote an article that addresses this very thing.  I wrote a small script that dynamically adds an id to the body element.  It takes the same parameters as WP&#8217;s core body_class() function.</p>
<p>You can check the article out here:<br />
<a href="http://darrinb.com/notes/2010/adding-a-custom-id-to-the-body-element-in-wordpress/" rel="nofollow">http://darrinb.com/notes/2010/adding-a-custom-id-to-the-body-element-in-wordpress/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/#comment-13321</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Wed, 07 Apr 2010 14:59:05 +0000</pubDate>
		<guid isPermaLink="false">http://tkenny.co.uk/inspectelement/?p=231#comment-13321</guid>
		<description>I&#039;ll definitely check out that article, Otto; however, it would be highly inconvenient to have to style pages by id. Much handier to use is_page.

Which actually brings me to my real question:

will is_page apply to child pages as well? Or is there some sort of is_child(&#039;parentname&#039;) function? Being able to style an entire &quot;category&quot; (not WP categories, but in the general sense of the word) of pages at once would be very handy for CMS.</description>
		<content:encoded><![CDATA[<p>I&#8217;ll definitely check out that article, Otto; however, it would be highly inconvenient to have to style pages by id. Much handier to use is_page.</p>
<p>Which actually brings me to my real question:</p>
<p>will is_page apply to child pages as well? Or is there some sort of is_child(&#8216;parentname&#8217;) function? Being able to style an entire &#8220;category&#8221; (not WP categories, but in the general sense of the word) of pages at once would be very handy for CMS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Kenny</title>
		<link>http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/#comment-4315</link>
		<dc:creator>Tom Kenny</dc:creator>
		<pubDate>Tue, 08 Dec 2009 18:04:21 +0000</pubDate>
		<guid isPermaLink="false">http://tkenny.co.uk/inspectelement/?p=231#comment-4315</guid>
		<description>Ignore this comment, testing threaded replies on a new theme design for Inspect Element.</description>
		<content:encoded><![CDATA[<p>Ignore this comment, testing threaded replies on a new theme design for Inspect Element.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto</title>
		<link>http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/#comment-2676</link>
		<dc:creator>Otto</dc:creator>
		<pubDate>Mon, 02 Nov 2009 16:40:33 +0000</pubDate>
		<guid isPermaLink="false">http://tkenny.co.uk/inspectelement/?p=231#comment-2676</guid>
		<description>Actually, since WordPress 2.8, there actually is a built in way to do this.

Change your body tag to look like this:
[body [?php body_class(); ?] ]

The body_class function outputs a &quot;class=&#039;whatever&#039;&quot; piece, and the classes it outputs depend on where you are on the site.

For example, the front page gets &quot;home&quot;, other Pages get &quot;page&quot;, individual pages get page-id-## (where the ## is the id number of the Page), etc. 

A full list of what gets what can be found here: http://wpengineer.com/wordpress-28-body_class-automatic_feed_links/</description>
		<content:encoded><![CDATA[<p>Actually, since WordPress 2.8, there actually is a built in way to do this.</p>
<p>Change your body tag to look like this:<br />
[body [?php body_class(); ?] ]</p>
<p>The body_class function outputs a &#8220;class=&#8217;whatever&#8217;&#8221; piece, and the classes it outputs depend on where you are on the site.</p>
<p>For example, the front page gets &#8220;home&#8221;, other Pages get &#8220;page&#8221;, individual pages get page-id-## (where the ## is the id number of the Page), etc. </p>
<p>A full list of what gets what can be found here: <a href="http://wpengineer.com/wordpress-28-body_class-automatic_feed_links/" rel="nofollow">http://wpengineer.com/wordpress-28-body_class-automatic_feed_links/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sajid Iqbal</title>
		<link>http://inspectelement.com/didyouknow/add-a-class-to-the-body-tag-in-wordpress/#comment-352</link>
		<dc:creator>Sajid Iqbal</dc:creator>
		<pubDate>Mon, 27 Jul 2009 07:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://tkenny.co.uk/inspectelement/?p=231#comment-352</guid>
		<description>Thanks. This is what I was looking for.</description>
		<content:encoded><![CDATA[<p>Thanks. This is what I was looking for.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

