<?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: Style Top Level Pages Differently</title>
	<atom:link href="http://www.htmlcenter.com/blog/wordpress-style-top-level-pages-differently/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.htmlcenter.com/blog/wordpress-style-top-level-pages-differently/</link>
	<description>Web Development Help and Tutorials</description>
	<lastBuildDate>Sun, 05 Feb 2012 17:25:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Get Information About Top-Level Pages in WordPress</title>
		<link>http://www.htmlcenter.com/blog/wordpress-style-top-level-pages-differently/#comment-15335</link>
		<dc:creator>Get Information About Top-Level Pages in WordPress</dc:creator>
		<pubDate>Tue, 05 Oct 2010 22:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=1443#comment-15335</guid>
		<description>[...] a week ago, someone commented on my post about styling top-level pages differently in WordPress, asking how to get the slug for a top-level page while one of its descendant pages is being [...]</description>
		<content:encoded><![CDATA[<p>[...] a week ago, someone commented on my post about styling top-level pages differently in WordPress, asking how to get the slug for a top-level page while one of its descendant pages is being [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtiss</title>
		<link>http://www.htmlcenter.com/blog/wordpress-style-top-level-pages-differently/#comment-15163</link>
		<dc:creator>Curtiss</dc:creator>
		<pubDate>Mon, 27 Sep 2010 12:54:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=1443#comment-15163</guid>
		<description>David - I&#039;m actually getting ready to do something extremely similar for a site on which I&#039;m working (I actually need to retrieve and display the full title of the top-level parent page, but it will be an extremely similar process). I&#039;ll be sure to post a new article about doing that once I get the functions written and working later this week. Thanks.</description>
		<content:encoded><![CDATA[<p>David &#8211; I&#8217;m actually getting ready to do something extremely similar for a site on which I&#8217;m working (I actually need to retrieve and display the full title of the top-level parent page, but it will be an extremely similar process). I&#8217;ll be sure to post a new article about doing that once I get the functions written and working later this week. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.htmlcenter.com/blog/wordpress-style-top-level-pages-differently/#comment-15074</link>
		<dc:creator>David</dc:creator>
		<pubDate>Fri, 24 Sep 2010 05:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=1443#comment-15074</guid>
		<description>I&#039;m looking for a way to return the Top Level Page&#039;s Slug from any page your on. So far your code here is the closest I&#039;ve found.  Good Job too!</description>
		<content:encoded><![CDATA[<p>I&#8217;m looking for a way to return the Top Level Page&#8217;s Slug from any page your on. So far your code here is the closest I&#8217;ve found.  Good Job too!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtiss</title>
		<link>http://www.htmlcenter.com/blog/wordpress-style-top-level-pages-differently/#comment-12725</link>
		<dc:creator>Curtiss</dc:creator>
		<pubDate>Thu, 20 May 2010 01:13:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=1443#comment-12725</guid>
		<description>To begin with, copy the two functions I provided in the post above into your theme&#039;s functions.php file.

Then, you would use code similar to:
&lt;pre&gt;&lt;code&gt;
&lt;?php if(!has_children()) { ?&gt;
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text&lt;/a&gt;
&lt;?php } else { ?&gt;
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
($child_page markup)
&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
&lt;?php } ?&gt;
&lt;?php if(is_child() &amp;&amp; !has_children()) { ?&gt;
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text&lt;/a&gt;
&lt;?php } elseif(is_child() &amp;&amp; has_children()) { ?&gt;
&lt;a href=&quot; $page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
($child_page markup)
&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
&lt;?php } ?&gt;
&lt;/code&gt;&lt;/pre&gt;

There&#039;s probably a simpler way to do it, and it&#039;s possible I&#039;ve slightly misunderstood your request, but that should at least get you started.</description>
		<content:encoded><![CDATA[<p>To begin with, copy the two functions I provided in the post above into your theme&#8217;s functions.php file.</p>
<p>Then, you would use code similar to:</p>
<pre><code>
&lt;?php if(!has_children()) { ?&gt;
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text&lt;/a&gt;
&lt;?php } else { ?&gt;
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
($child_page markup)
&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
&lt;?php } ?&gt;
&lt;?php if(is_child() &amp;&amp; !has_children()) { ?&gt;
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text&lt;/a&gt;
&lt;?php } elseif(is_child() &amp;&amp; has_children()) { ?&gt;
&lt;a href=&quot; $page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
($child_page markup)
&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
&lt;?php } ?&gt;
</code></pre>
<p>There&#8217;s probably a simpler way to do it, and it&#8217;s possible I&#8217;ve slightly misunderstood your request, but that should at least get you started.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo</title>
		<link>http://www.htmlcenter.com/blog/wordpress-style-top-level-pages-differently/#comment-12719</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Wed, 19 May 2010 06:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=1443#comment-12719</guid>
		<description>Hey,
I have come across this post and was wondering if you could possibly help me. I am not a php guru but am trying to achieve something which is along similar lines to what you have posted here.
I am wanting to build a menu for my site which outputs different markup to the wp_list_pages function.

instead of the usual unordered list markup output i would like to output:

instead of the usual unordered list markup output i would like to output:
&lt;code&gt;//this markup for each parent page that has no children

&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text&lt;/a&gt; 
//this markup for each parent page with children
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
		($child_page markup)
	&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
//this markup for each child page and has no children
&lt;a href=&quot;$page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text&lt;/a&gt;
//this markup for each child page with children
&lt;a href=&quot; $page_link&quot; title=&quot;$title&quot; rel=&quot;nofollow&quot;&gt;$link_text
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
		($child_page markup)
	&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;&lt;/code&gt;

But I have no idea how to go about writing some code to achieve this (at the moment I have achieved this by constructing the menu in plain old static html however ideally i would like this to be dynamic so that it updates automatically without me needing to write the html everytime I add a new page.
I have thought about using preg_replace with the wp_list_pages function. Any ideas or help would be greatly appreciated!</description>
		<content:encoded><![CDATA[<p>Hey,<br />
I have come across this post and was wondering if you could possibly help me. I am not a php guru but am trying to achieve something which is along similar lines to what you have posted here.<br />
I am wanting to build a menu for my site which outputs different markup to the wp_list_pages function.</p>
<p>instead of the usual unordered list markup output i would like to output:</p>
<p>instead of the usual unordered list markup output i would like to output:<br />
<code>//this markup for each parent page that has no children</p>
<p>&lt;a href="$page_link" title="$title" rel="nofollow"&gt;$link_text&lt;/a&gt;<br />
//this markup for each parent page with children<br />
&lt;a href="$page_link" title="$title" rel="nofollow"&gt;$link_text<br />
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;<br />
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;<br />
		($child_page markup)<br />
	&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;<br />
//this markup for each child page and has no children<br />
&lt;a href="$page_link" title="$title" rel="nofollow"&gt;$link_text&lt;/a&gt;<br />
//this markup for each child page with children<br />
&lt;a href=" $page_link" title="$title" rel="nofollow"&gt;$link_text<br />
&lt;!--[if gte IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;<br />
&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;<br />
		($child_page markup)<br />
	&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;</code></p>
<p>But I have no idea how to go about writing some code to achieve this (at the moment I have achieved this by constructing the menu in plain old static html however ideally i would like this to be dynamic so that it updates automatically without me needing to write the html everytime I add a new page.<br />
I have thought about using preg_replace with the wp_list_pages function. Any ideas or help would be greatly appreciated!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

