<?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 Display Dynamic Menu Pages In WordPress</title>
	<atom:link href="http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress</link>
	<description></description>
	<lastBuildDate>Tue, 03 Jan 2012 23:18:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Rahul</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-19935</link>
		<dc:creator>Rahul</dc:creator>
		<pubDate>Tue, 03 Jan 2012 17:01:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-19935</guid>
		<description>How can I check current page is home page or other.

I try this syntax

if ( is_home() ) { echo ‘ class=”current_page_item”‘; }

But not working I use wordpress 3.3

Any idea…???</description>
		<content:encoded><![CDATA[<p>How can I check current page is home page or other.</p>
<p>I try this syntax</p>
<p>if ( is_home() ) { echo ‘ class=”current_page_item”‘; }</p>
<p>But not working I use wordpress 3.3</p>
<p>Any idea…???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucian Florian</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-12525</link>
		<dc:creator>Lucian Florian</dc:creator>
		<pubDate>Tue, 21 Jun 2011 14:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-12525</guid>
		<description>@Dan and @Jack:
you can both accomplish that using jQuery. Google &quot;add class&quot; or &quot;add html with jQuery&quot;.</description>
		<content:encoded><![CDATA[<p>@Dan and @Jack:<br />
you can both accomplish that using jQuery. Google &#8220;add class&#8221; or &#8220;add html with jQuery&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-12509</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Mon, 20 Jun 2011 21:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-12509</guid>
		<description>Nice! You seem to know how to manage the function wp_list_pages pretty well. So I&#039;m asking you one question. Is it 
possible to customize the href in the link so it will add an &#039;#&#039; at the beginning of the href ? I&#039;m using a theme 
that used Anchors to scroll between pages.

Thanks</description>
		<content:encoded><![CDATA[<p>Nice! You seem to know how to manage the function wp_list_pages pretty well. So I&#8217;m asking you one question. Is it<br />
possible to customize the href in the link so it will add an &#8216;#&#8217; at the beginning of the href ? I&#8217;m using a theme<br />
that used Anchors to scroll between pages.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-3721</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Thu, 25 Nov 2010 00:26:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-3721</guid>
		<description>is it possible to get the  to generate a class? if the list could generate the class equal to the page name i think that could be pretty powerful</description>
		<content:encoded><![CDATA[<p>is it possible to get the  to generate a class? if the list could generate the class equal to the page name i think that could be pretty powerful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-3435</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Sun, 07 Nov 2010 20:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-3435</guid>
		<description>Can we do the same for categories? I would like to have the same on categories.</description>
		<content:encoded><![CDATA[<p>Can we do the same for categories? I would like to have the same on categories.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tosho</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-2629</link>
		<dc:creator>tosho</dc:creator>
		<pubDate>Sat, 25 Sep 2010 22:41:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-2629</guid>
		<description>@Norbert The custom post type pages are not considered &quot;pages&quot; by the is_page() check, which is used in the wp_list_pages() to figure out current-... classes.

Workaround for now is to set 

$wp_query-&gt;is_posts_page=true;

or

$wp_query-&gt;is_page=true;

before calling wp_list_pages().

If your code requires it, set whatever you changed back to false after getting your list.</description>
		<content:encoded><![CDATA[<p>@Norbert The custom post type pages are not considered &#8220;pages&#8221; by the is_page() check, which is used in the wp_list_pages() to figure out current-&#8230; classes.</p>
<p>Workaround for now is to set </p>
<p>$wp_query-&gt;is_posts_page=true;</p>
<p>or</p>
<p>$wp_query-&gt;is_page=true;</p>
<p>before calling wp_list_pages().</p>
<p>If your code requires it, set whatever you changed back to false after getting your list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucian Florian</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-2314</link>
		<dc:creator>Lucian Florian</dc:creator>
		<pubDate>Thu, 02 Sep 2010 14:34:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-2314</guid>
		<description>I don&#039;t believe this is included in the core yet but there is a workaround. 
Assuming you use the custom navigation code to call the menu (the code uses the escaped php characters and need to be adjusted): 

&lt;?php wp_nav_menu( array(&#039;menu&#039; =&gt; &#039;Main Menu&#039; )); ?&gt;
you can replace it with:

&lt;?php
$nav_menu = wp_nav_menu( array(&#039;menu&#039; =&gt; &#039;Main Menu&#039;, &#039;echo&#039; =&gt; false));
// get post type
$post_type = get_post_type( $post );
if (preg_match(&#039;/custom-post-type-name-class/&#039;, $nav_menu) &amp;&amp; $post_type == &#039;custom-post-type-name&#039;)  {
$nav_menu = preg_replace(&#039;/class=\&quot;custom-post-type-name-class/&#039;, &#039;/class=&quot;current_page_item /&#039;, $nav_menu);
}
echo $nav_menu;
?&gt;</description>
		<content:encoded><![CDATA[<p>I don&#8217;t believe this is included in the core yet but there is a workaround.<br />
Assuming you use the custom navigation code to call the menu (the code uses the escaped php characters and need to be adjusted): </p>
<p>< ?php wp_nav_menu( array('menu' => &#8216;Main Menu&#8217; )); ?><br />
you can replace it with:</p>
<p>< ?php<br />
$nav_menu = wp_nav_menu( array('menu' => &#8216;Main Menu&#8217;, &#8216;echo&#8217; => false));<br />
// get post type<br />
$post_type = get_post_type( $post );<br />
if (preg_match(&#8216;/custom-post-type-name-class/&#8217;, $nav_menu) &#038;&#038; $post_type == &#8216;custom-post-type-name&#8217;)  {<br />
$nav_menu = preg_replace(&#8216;/class=\&#8221;custom-post-type-name-class/&#8217;, &#8216;/class=&#8221;current_page_item /&#8217;, $nav_menu);<br />
}<br />
echo $nav_menu;<br />
?></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norbert</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-2252</link>
		<dc:creator>Norbert</dc:creator>
		<pubDate>Fri, 27 Aug 2010 12:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-2252</guid>
		<description>Hi, any idea why the &#039;wp_list_page(post_type=xyz)&#039; does not produce any &#039;current&#039; classes?? 
I mean how can i css-style a current_page_item in a list of pages that are of a custom-post-type?
Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi, any idea why the &#8216;wp_list_page(post_type=xyz)&#8217; does not produce any &#8216;current&#8217; classes??<br />
I mean how can i css-style a current_page_item in a list of pages that are of a custom-post-type?<br />
Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucian</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-1074</link>
		<dc:creator>Lucian</dc:creator>
		<pubDate>Wed, 03 Mar 2010 02:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-1074</guid>
		<description>You need to be inside a child page to see the parent ancestor class. You need to setup a child page in Wordpress back-end, by assigning a parent page to it.
I have just tested it and it works. Not sure what you are doing wrong.</description>
		<content:encoded><![CDATA[<p>You need to be inside a child page to see the parent ancestor class. You need to setup a child page in WordPress back-end, by assigning a parent page to it.<br />
I have just tested it and it works. Not sure what you are doing wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.fldtrace.com/wordpress/how-to-display-dynamic-menu-in-wordpress/comment-page-1#comment-1072</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 02 Mar 2010 22:24:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.fldtrace.com/?p=312#comment-1072</guid>
		<description>Thanks Lucian, then I check the code I just see the default class class=&quot;page_item page-item-(the number)&quot; but nothing else. Also I see the span tags on parent and child. 

Do you have any idea what may be wrong?

Thanks again,
Paul</description>
		<content:encoded><![CDATA[<p>Thanks Lucian, then I check the code I just see the default class class=&#8221;page_item page-item-(the number)&#8221; but nothing else. Also I see the span tags on parent and child. </p>
<p>Do you have any idea what may be wrong?</p>
<p>Thanks again,<br />
Paul</p>
]]></content:encoded>
	</item>
</channel>
</rss>

