<?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: Link separator for wp_list_pages()</title>
	<atom:link href="http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/</link>
	<description>www.rarescosma.com &#124; Hardboiled Frontend &#38; WordPress Developer</description>
	<lastBuildDate>Wed, 28 Dec 2011 11:31:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Marcus</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-1377</link>
		<dc:creator>Marcus</dc:creator>
		<pubDate>Thu, 01 Dec 2011 20:40:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-1377</guid>
		<description>Worked perfectly.  Thanks a million!</description>
		<content:encoded><![CDATA[<p>Worked perfectly.  Thanks a million!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Cunniffe</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-1062</link>
		<dc:creator>David Cunniffe</dc:creator>
		<pubDate>Fri, 07 Oct 2011 22:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-1062</guid>
		<description>Great, Thanks. That did the trick.</description>
		<content:encoded><![CDATA[<p>Great, Thanks. That did the trick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rares</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-1061</link>
		<dc:creator>Rares</dc:creator>
		<pubDate>Fri, 07 Oct 2011 16:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-1061</guid>
		<description>David,

You could try to replace the &lt;code&gt;wp_list_pages()&lt;/code&gt; call with &lt;code&gt;wp_page_menu()&lt;/code&gt;. Then you can pass in the &lt;code&gt;&#039;show_home&#039; =&gt; 1&lt;/code&gt; parameter (add it to the &lt;code&gt;$args&lt;/code&gt; array).</description>
		<content:encoded><![CDATA[<p>David,</p>
<p>You could try to replace the <code>wp_list_pages()</code> call with <code>wp_page_menu()</code>. Then you can pass in the <code>'show_home' => 1</code> parameter (add it to the <code>$args</code> array).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Cunniffe</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-1060</link>
		<dc:creator>David Cunniffe</dc:creator>
		<pubDate>Fri, 07 Oct 2011 15:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-1060</guid>
		<description>Cool. I had spent ages trying to figure that out. Just one question. How do I include a link to the home page?</description>
		<content:encoded><![CDATA[<p>Cool. I had spent ages trying to figure that out. Just one question. How do I include a link to the home page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-999</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Fri, 16 Sep 2011 19:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-999</guid>
		<description>preg_replace is expensive and you should always try to do the code right from the sever if possible and not just fix it using jQuery. The best way is looping through get_pages(). You can then format it any way you want. 

&lt;pre class=&quot;brush:php&quot;&gt;
$pages = get_pages( array(&#039;parent&#039; =&gt; 0, &#039;sort_column&#039; =&gt; &#039;menu_order, post_title&#039;) );
for ($x = 0; $x &lt; count($pages); $x++) {
    if ($x != 0)
        echo &quot; &#124; &quot;;
    echo &quot;&lt;a href=&#039;&quot; . get_permalink( $pages[$x]-&gt;ID ) . &quot;&gt;&quot; . $pages[$x]-&gt;post_title . &quot;&lt;/a&gt;&quot;;
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>preg_replace is expensive and you should always try to do the code right from the sever if possible and not just fix it using jQuery. The best way is looping through get_pages(). You can then format it any way you want. </p>
<pre class="brush:php">
$pages = get_pages( array('parent' =&gt; 0, 'sort_column' =&gt; 'menu_order, post_title') );
for ($x = 0; $x &lt; count($pages); $x++) {
    if ($x != 0)
        echo &quot; | &quot;;
    echo "&lt;a href='" . get_permalink( $pages[$x]-&gt;ID ) . "&gt;" . $pages[$x]-&gt;post_title . "&lt;/a&gt;";
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Link separators for wp_list_pages() code snippet &#124; WebDino.net</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-567</link>
		<dc:creator>Link separators for wp_list_pages() code snippet &#124; WebDino.net</dc:creator>
		<pubDate>Wed, 25 May 2011 01:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-567</guid>
		<description>[...] note: I got this code from Rares Comes (very nice lavalamp menu [...]</description>
		<content:encoded><![CDATA[<p>[...] note: I got this code from Rares Comes (very nice lavalamp menu [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rares</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-150</link>
		<dc:creator>Rares</dc:creator>
		<pubDate>Tue, 14 Dec 2010 14:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-150</guid>
		<description>You&#039;re welcome. ;-)

#1: Did you take a look at the source code of the page to confirm the right position of the separators?
#2: This sounds more like a styling problem. Can you provide me with a link to the site in question?</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome. <img src='http://www.rarescosma.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>#1: Did you take a look at the source code of the page to confirm the right position of the separators?<br />
#2: This sounds more like a styling problem. Can you provide me with a link to the site in question?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Boggs</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-149</link>
		<dc:creator>Chris Boggs</dc:creator>
		<pubDate>Mon, 13 Dec 2010 17:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-149</guid>
		<description>Thanks for sharing this code, I appreciate it. I have a question or two. I implemented the PHP version (not the js) and it works but with two problems:
1. The seperators come before each nav li, not after, so there is a &quot;&#124;&quot; before the first nav element and not one before the last. How do I alter this output?
2. The &quot;&#124;&quot; seperators are showing up 30 to 40 pixels BELOW the menu items, as if they are on a seperate line. How do I control their placement?

Any suggestions would be greatly appreciated and, once again, thanks for posting this solution.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this code, I appreciate it. I have a question or two. I implemented the PHP version (not the js) and it works but with two problems:<br />
1. The seperators come before each nav li, not after, so there is a &#8220;|&#8221; before the first nav element and not one before the last. How do I alter this output?<br />
2. The &#8220;|&#8221; seperators are showing up 30 to 40 pixels BELOW the menu items, as if they are on a seperate line. How do I control their placement?</p>
<p>Any suggestions would be greatly appreciated and, once again, thanks for posting this solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bizim Oyun Sitesi</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-25</link>
		<dc:creator>Bizim Oyun Sitesi</dc:creator>
		<pubDate>Thu, 03 Jun 2010 10:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-25</guid>
		<description>I will use this solution at my site. thank you.</description>
		<content:encoded><![CDATA[<p>I will use this solution at my site. thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Capn My Way</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-24</link>
		<dc:creator>Capn My Way</dc:creator>
		<pubDate>Wed, 02 Jun 2010 15:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-24</guid>
		<description>Thanks!  I just didnt understand that code went inside the &lt;?php tag.

Works like a charm!</description>
		<content:encoded><![CDATA[<p>Thanks!  I just didnt understand that code went inside the &lt;?php tag.</p>
<p>Works like a charm!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rares</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-23</link>
		<dc:creator>Rares</dc:creator>
		<pubDate>Wed, 02 Jun 2010 11:31:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-23</guid>
		<description>Wherever you output the navigation code in your templates. 
This article assumes you&#039;re building the nav menu with the &lt;code&gt;wp_list_pages()&lt;/code&gt; function. 
You have to find out where this function is called. (most probably &lt;code&gt;header.php&lt;/code&gt;)

There&#039;s an alternative solution to this problem, if you don&#039;t mind a little bit of client side processing (jQuery).
If the nav menu list element has an id of &lt;code&gt;#nav&lt;/code&gt;:
&lt;pre class=&quot;brush:jscript&quot;&gt;
$(document).ready(function(){
	$(&quot;ul#nav li:not(:last-child)&quot;).append(&quot; &#124; &quot;);
});
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Wherever you output the navigation code in your templates.<br />
This article assumes you&#8217;re building the nav menu with the <code>wp_list_pages()</code> function.<br />
You have to find out where this function is called. (most probably <code>header.php</code>)</p>
<p>There&#8217;s an alternative solution to this problem, if you don&#8217;t mind a little bit of client side processing (jQuery).<br />
If the nav menu list element has an id of <code>#nav</code>:</p>
<pre class="brush:jscript">
$(document).ready(function(){
	$("ul#nav li:not(:last-child)").append(" | ");
});
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Capn My Way</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-21</link>
		<dc:creator>Capn My Way</dc:creator>
		<pubDate>Tue, 01 Jun 2010 20:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-21</guid>
		<description>One question: Where does this code go? (Meaning, where do I paste it?)

Thanks for the code, and the explanation!</description>
		<content:encoded><![CDATA[<p>One question: Where does this code go? (Meaning, where do I paste it?)</p>
<p>Thanks for the code, and the explanation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Notable Tech Posts &#8211; 2010.04.18 &#124; The Life of Lew Ayotte</title>
		<link>http://www.rarescosma.com/2010/02/link-separator-for-wp_list_pages/#comment-14</link>
		<dc:creator>Notable Tech Posts &#8211; 2010.04.18 &#124; The Life of Lew Ayotte</dc:creator>
		<pubDate>Mon, 19 Apr 2010 04:02:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rarescosma.com/?p=143#comment-14</guid>
		<description>[...] Link separator for wp_list_pages [...]</description>
		<content:encoded><![CDATA[<p>[...] Link separator for wp_list_pages [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

