<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>corprewland &#187; navigation</title>
	<atom:link href="http://www.corprew.org/blog/tag/navigation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.corprew.org</link>
	<description>(dis)information organization</description>
	<lastBuildDate>Thu, 04 Feb 2010 20:48:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>more from the wordpress toolbox</title>
		<link>http://www.corprew.org/blog/2009/11/02/more-from-the-wordpress-toolbox/</link>
		<comments>http://www.corprew.org/blog/2009/11/02/more-from-the-wordpress-toolbox/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 20:35:59 +0000</pubDate>
		<dc:creator>corprew</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.corprew.org/blog/2009/11/02/more-from-the-wordpress-toolbox/</guid>
		<description><![CDATA[This is a trivial something that seems to come up staggeringly often when translating design to implementation in word press sites, so I thought I&#8217;d post it up here so I don&#8217;t have to recreate from scratch next time I need it. So, you have a long, carefully contrived, SEO-friendly title for your pages (or [...]]]></description>
			<content:encoded><![CDATA[<p>This is a trivial something that seems to come up staggeringly often when translating design to implementation in word press sites, so I thought I&#8217;d post it up here so I don&#8217;t have to recreate from scratch next time I need it. </p>
<p>So, you have a long, carefully contrived, SEO-friendly title for your pages (or really just a minimally descriptive one), but you don&#8217;t want that to show up in the navigation menus.  There are a variety of complex ways to fix this, but one of the easiest is to use code like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php 
    <span style="color: #000088;">$pages</span> <span style="color: #339933;">=</span> get_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;parent=0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># returns parent pages</span>
      <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pages</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$x_page</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$option</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;li&gt;&lt;a href=&quot;'</span><span style="color: #339933;">.</span>get_page_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x_page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$short_title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$short_title</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x_page</span> <span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;nav_title&quot;</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$short_title</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$option</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$x_page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">else</span>
                <span style="color: #000088;">$option</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$short_title</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">end</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$option</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">echo</span> <span style="color: #000088;">$option</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
 <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>This usually ends up in header.php, and is a good patch for the problem.  There are a couple of plugins that attempt to work around this by detecting whether or not you&#8217;re in the loop (the loop being the name for the main part of post/page printing), but invariably widgets screw this up somehow, and this solution seems to work a bit better for me, especially for a navigation header (hence the name.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.corprew.org/blog/2009/11/02/more-from-the-wordpress-toolbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
