<?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>Beau Blackwell &#187; pages</title>
	<atom:link href="http://beaublackwell.com/tag/pages/feed/" rel="self" type="application/rss+xml" />
	<link>http://beaublackwell.com</link>
	<description>Internet Marketing Advice From an Industry Insider</description>
	<lastBuildDate>Thu, 01 Dec 2011 17:29:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress Tip: Hiding Pages or Categories from Your Navigation</title>
		<link>http://beaublackwell.com/blogging/wordpress-tips/wordpress-tip-hiding-pages-categories-navigation/</link>
		<comments>http://beaublackwell.com/blogging/wordpress-tips/wordpress-tip-hiding-pages-categories-navigation/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 21:18:25 +0000</pubDate>
		<dc:creator>Beau</dc:creator>
				<category><![CDATA[Wordpress Tips]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[exclusion]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[pages]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://beaublackwell.com/?p=41</guid>
		<description><![CDATA[If you run a blog that has lots of pages or categories (for example, if you blog on a lot of different subjects), you may run across a situation where there are so many categories listed in your navigation that it can &#8220;break&#8221; your theme by causing your navbar to wrap around. Usually this isn&#8217;t the end of the world, but you also want your theme to look its best and not distract readers by looking broken. For a number &#8230; <a href="http://beaublackwell.com/blogging/wordpress-tips/wordpress-tip-hiding-pages-categories-navigation/" >&#8594;</a>]]></description>
			<content:encoded><![CDATA[<p>If you run a blog that has lots of pages or categories (for example, if you blog on a lot of different subjects), you may run across a situation where there are so many categories listed in your navigation that it can &#8220;break&#8221; your theme by causing your navbar to wrap around.</p>
<p>Usually this isn&#8217;t the end of the world, but you also want your theme to look its best and not distract readers by looking broken.</p>
<p>For a number of reasons, you may also just want a particular category or page to be hidden from viewers, such as specific landing pages that you want to drive visitors to from advertising or special promotions.</p>
<p>One easy way to accomplish this in WordPress is to exclude these items from any menus that call for them.</p>
<p>The bad news: This tip requires changing the PHP code on your blog a bit. The good news: It&#8217;s a really easy change and can be fixed quickly if there&#8217;s any problem. Don&#8217;t worry, this only takes a few minutes and is very, very easy.</p>
<p>The same advice applies whether you&#8217;re working on pages, categories, or even posts, so I&#8217;ll just address pages for simplicity&#8217;s sake.</p>
<h2>Prep Work</h2>
<p>The first thing you&#8217;ll need to do is get the item numbers of the pages or categories. If you&#8217;re relatively new to WordPress, every category, page, and post gets an item ID number assigned to it in addition to the name you give it. To exclude these items, we need to reference those numbers.</p>
<p>To find the item ID, click on <strong>Edit-&gt;Pages</strong> in the left menu of your WordPress Admin. Hover your mouse over the name of the page you want to exclude, and down at the bottom of your browser window, you should see a full URL. At the very end of the URL, you&#8217;ll see &#8220;&amp;post=###.&#8221; This number is the item ID for your page or category.</p>
<p>Here&#8217;s an example of what you should see:</p>
<p><img class="alignnone size-full wp-image-42" title="page-number" src="http://beaublackwell.com/wp-content/uploads/2009/11/page-number.gif" alt="page-number" width="257" height="24" /></p>
<p>So in this case, the page ID is 2351 (even though it says post).</p>
<h2>How to Hack the Code</h2>
<p>Now that we&#8217;ve got the item ID, we can make the actual changes that will hide the page.</p>
<p>The first thing you&#8217;ll need to do is determine what part of your theme is displaying the navigation you want to change. Most likely (though it all depends on your WordPress theme), it&#8217;ll be header.php or a sidebar.php. Go to <strong>Appearance-&gt;Editor</strong>. Now, under Templates on the right side of the page, click on the PHP file where you think the navigation resides.</p>
<p>Now you&#8217;ll look for the part of the code that references your menu. Usually designers will use well-named &#8220;div ids&#8221; to try to make the code obvious, like &lt;div id=&#8221;navbar&#8221;&gt;. Under this div id, you should see a line of code that looks somewhat similar to:</p>
<blockquote><p>&lt;?php wp_list_pages(&#8216;sort_column=menu_order&amp;title_li=&amp;depth=3&#8242;); ?&gt;</p></blockquote>
<p>The main thing you&#8217;re looking for is the wp_list_pages part. If you&#8217;re working on categories, this will say wp_list_categories.</p>
<p>After whatever the final &#8220;&amp;thing=#&#8221; statement in that line, attach &#8220;&amp;exclude=#&#8221; with # being your page or category ID number. So from our example code and item ID above, we would end up with:</p>
<blockquote><p>&lt;?php wp_list_pages(&#8216;sort_column=menu_order&amp;title_li=&amp;depth=3<strong>&amp;exclude=2351</strong>&#8216;); ?&gt; (Bold is just for emphasis here, it&#8217;s not actually used in the code)</p></blockquote>
<p>If you have multiple pages you want to exclude, just put a comma in between each, such as &#8220;&amp;exclude=2351,504,276&#8243;. This will hide all of these from your menu.</p>
<p>Once you add in your exclusions, just click Update File and you&#8217;ll be good to go! Refresh your page and you should see the items gone from your menu. Depending on your web host, it may take a few minutes for your changes to update to your cache- I&#8217;ve had problems with slow refreshing using GoDaddy in the past.</p>
<p>I hope that helps you with your theme! Please leave any questions or other methods you know of in the comments section.</p>
]]></content:encoded>
			<wfw:commentRss>http://beaublackwell.com/blogging/wordpress-tips/wordpress-tip-hiding-pages-categories-navigation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

