<?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: WordPress challenge: getting class current_page_item to work when home page is not blog</title>
	<atom:link href="http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Fri, 19 Mar 2010 19:45:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jessica</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-60075</link>
		<dc:creator>jessica</dc:creator>
		<pubDate>Tue, 23 Jun 2009 02:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-60075</guid>
		<description>if you are using a separate page for your front page vs your blog page, then:
is_front_page() will return true on your home page
is_home() will return true on your blog page</description>
		<content:encoded><![CDATA[<p>if you are using a separate page for your front page vs your blog page, then:<br />
is_front_page() will return true on your home page<br />
is_home() will return true on your blog page</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-14859</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 07 Oct 2008 04:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-14859</guid>
		<description>I think there is a conditional tag to do this automatically now. I remember something about it in the 2.5 upgrade, or maybe it was 2.6? I can&#039;t remember the details, but if you look in the codex there should be some information about it there.</description>
		<content:encoded><![CDATA[<p>I think there is a conditional tag to do this automatically now. I remember something about it in the 2.5 upgrade, or maybe it was 2.6? I can&#8217;t remember the details, but if you look in the codex there should be some information about it there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wynny</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-14785</link>
		<dc:creator>wynny</dc:creator>
		<pubDate>Mon, 06 Oct 2008 20:57:40 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-14785</guid>
		<description>i had the same problem.
the solution is to delete the home.php file - select your blog page as posts-page in the wp settings.


as frontpage i selected a page called &quot;home&quot; and made a extra template for that page


works fine :)</description>
		<content:encoded><![CDATA[<p>i had the same problem.<br />
the solution is to delete the home.php file &#8211; select your blog page as posts-page in the wp settings.</p>
<p>as frontpage i selected a page called &#8220;home&#8221; and made a extra template for that page</p>
<p>works fine <img src='http://wpgarage.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miriam Schwab</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-737</link>
		<dc:creator>Miriam Schwab</dc:creator>
		<pubDate>Thu, 31 Jan 2008 13:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-737</guid>
		<description>Jamie - looks great. I hope to try it out and see how it works.</description>
		<content:encoded><![CDATA[<p>Jamie &#8211; looks great. I hope to try it out and see how it works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-736</link>
		<dc:creator>Jamie</dc:creator>
		<pubDate>Thu, 31 Jan 2008 13:10:39 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-736</guid>
		<description>This is one of the reasons I did not use the supploed function wp_list_categories.
as it did not highlight the current page.

My plugin however does &lt;a&gt;Drop Down Menu WordPress plugin&lt;/a&gt;

It auto highlights the current page you are on.


You can arrange the pages and in the navigation menu anyway you want, and have a link to your blog/homepage as well.</description>
		<content:encoded><![CDATA[<p>This is one of the reasons I did not use the supploed function wp_list_categories.<br />
as it did not highlight the current page.</p>
<p>My plugin however does <a>Drop Down Menu WordPress plugin</a></p>
<p>It auto highlights the current page you are on.</p>
<p>You can arrange the pages and in the navigation menu anyway you want, and have a link to your blog/homepage as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-734</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Thu, 10 Jan 2008 09:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-734</guid>
		<description>The second plugin (Logged-in-only) is a bit bugy at the moment (v0.7) so i don&#039;t want to make big publicity for it.

The plugin Current-Page Bugfix get it&#039;s englisch summary yet. You can promote this one. :) Thank you.</description>
		<content:encoded><![CDATA[<p>The second plugin (Logged-in-only) is a bit bugy at the moment (v0.7) so i don&#8217;t want to make big publicity for it.</p>
<p>The plugin Current-Page Bugfix get it&#8217;s englisch summary yet. You can promote this one. <img src='http://wpgarage.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miriam Schwab</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-733</link>
		<dc:creator>Miriam Schwab</dc:creator>
		<pubDate>Thu, 10 Jan 2008 08:35:42 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-733</guid>
		<description>Thomas - that&#039;s a great plugin! I hope to test it out soon. Your other plugin &quot;Logged-in Only&quot; looks interesting too. I used Google Translate to figure out what it&#039;s about, but not with much luck. Can you write an English summary of both these plugins and I&#039;ll post about them here on WordPressGarage?</description>
		<content:encoded><![CDATA[<p>Thomas &#8211; that&#8217;s a great plugin! I hope to test it out soon. Your other plugin &quot;Logged-in Only&quot; looks interesting too. I used Google Translate to figure out what it&#8217;s about, but not with much luck. Can you write an English summary of both these plugins and I&#8217;ll post about them here on WordPressGarage?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-732</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Thu, 10 Jan 2008 08:04:10 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-732</guid>
		<description>I fixed the problem by developing a plugin. You have to replace wp_list_pages by my own function and then you can sort the menu as you like. Have a look:
http://thomas.lippert.it/v4/wordpress-plugins/current-page-bugfix/</description>
		<content:encoded><![CDATA[<p>I fixed the problem by developing a plugin. You have to replace wp_list_pages by my own function and then you can sort the menu as you like. Have a look:<br />
<a href="http://thomas.lippert.it/v4/wordpress-plugins/current-page-bugfix/" rel="nofollow">http://thomas.lippert.it/v4/wordpress-plugins/current-page-bugfix/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Lippert &#187; Blog Archive &#187; WordPress und wp_list_pages</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-735</link>
		<dc:creator>Thomas Lippert &#187; Blog Archive &#187; WordPress und wp_list_pages</dc:creator>
		<pubDate>Wed, 09 Jan 2008 09:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-735</guid>
		<description>[...] Um die Liste nun in ein Men? verwandeln zu k?nnen, gibt WordPress einige CSS Klassen mit, die man nutzen kann. Nun zum Problem: F?r alle Seiten wird die Klasse current_page_item mitgeliefert wenn sie ausgew?hlt sind, nur f?r die als Beitragsseite ausgew?hlte nicht. Das Problem ist bekannt und es gibt inzwischen eine lange Diskussion mit vielen L?sungsvorschl?gen. Zudem hat ein Blog auch schon eine Challenge f?r eine L?sung dieses Problems ausgeschrieben. [...]</description>
		<content:encoded><![CDATA[<p>[...] Um die Liste nun in ein Men? verwandeln zu k?nnen, gibt WordPress einige CSS Klassen mit, die man nutzen kann. Nun zum Problem: F?r alle Seiten wird die Klasse current_page_item mitgeliefert wenn sie ausgew?hlt sind, nur f?r die als Beitragsseite ausgew?hlte nicht. Das Problem ist bekannt und es gibt inzwischen eine lange Diskussion mit vielen L?sungsvorschl?gen. Zudem hat ein Blog auch schon eine Challenge f?r eine L?sung dieses Problems ausgeschrieben. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren Hoyt</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/comment-page-1/#comment-731</link>
		<dc:creator>Darren Hoyt</dc:creator>
		<pubDate>Fri, 07 Dec 2007 02:59:02 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comment-731</guid>
		<description>I use a similar-but-different method from  Nathan&#039;s. First, I make sure to put a conditional on the body of the page:

&lt;code&gt;&lt;p&gt;&lt;body&lt;?php if ( is_home() ) { ?&gt; id=&quot;home&quot;&lt;?php } ?&gt;&gt;&lt;/p&gt;&lt;/code&gt;

Then I add this to the HTML:


&lt;code&gt;&lt;p&gt;&lt;ul id=&quot;nav&quot;&gt;
  &lt;br /&gt;&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_option(&#039;home&#039;); ?&gt;/&quot; class=&quot;on&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;

  &lt;br /&gt;&lt;?php wp_list_pages(&#039;title_li=&#039;); ?&gt;

  &lt;br /&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/code&gt;



And I make sure there&#039;s a CSS rule to highlight the &#039;Home&#039; button when you&#039;re on that page:
&lt;code&gt;&lt;p&gt;#home .on {
  &lt;br /&gt;background:#000;

  &lt;br /&gt;}&lt;/p&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I use a similar-but-different method from  Nathan&#8217;s. First, I make sure to put a conditional on the body of the page:</p>
<p><code>
<p>&lt;body&lt;?php if ( is_home() ) { ?&gt; id=&quot;home&quot;&lt;?php } ?&gt;&gt;</p>
<p></code></p>
<p>Then I add this to the HTML:</p>
<p><code>
<p>&lt;ul id=&quot;nav&quot;&gt;<br />
  <br />&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_option('home'); ?&gt;/&quot; class=&quot;on&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;?php wp_list_pages('title_li='); ?&gt;</p>
<p>&lt;/ul&gt;</p>
<p></code></p>
<p>And I make sure there&#8217;s a CSS rule to highlight the &#8216;Home&#8217; button when you&#8217;re on that page:<br />
<code>
<p>#home .on {<br />
  <br />background:#000;</p>
<p>}</p>
<p></code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
