<?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>WP Garage &#187; Pages</title>
	<atom:link href="http://wpgarage.com/tag/pages/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Wed, 16 Nov 2011 14:36:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>QuickTip: Show More Pages in your WordPress Dashboard</title>
		<link>http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/</link>
		<comments>http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/#comments</comments>
		<pubDate>Thu, 12 May 2011 09:37:57 +0000</pubDate>
		<dc:creator>Rebecca Markowitz</dc:creator>
				<category><![CDATA[News & Views]]></category>
		<category><![CDATA[Shorties]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Pages]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[screen options]]></category>
		<category><![CDATA[show]]></category>

		<guid isPermaLink="false">?p=954</guid>
		<description><![CDATA[<p>I am totally in love with the Screen Options pull down tab in WordPress. I know it&#8217;s been there for a few versions, but I never fully appreciated it until I started using the Show on Screen feature that lets you fill in how many pages you want to show in your list of Pages. [...]</p><p>This post was originally published at <a href="http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/">QuickTip: Show More Pages in your WordPress Dashboard</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/" data-url="http://illum.in/p63k1d" data-text="QuickTip: Show More Pages in your WordPress Dashboard" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/"></g:plusone></div></div><p>I am totally in love with the Screen Options pull down tab in WordPress. I know it&#8217;s been there for a few versions, but I never fully appreciated it until I started using the <strong>Show on Screen</strong> feature that lets you fill in how many pages you want to show in your list of Pages. Some of our clients sites have hundreds of pages and posts, and this gives them the option to see all their posts or pages at once and not have to click next next next.</p>
<p>To use it, go into the Pages or the Posts Tab in your Dashboard, click on <strong>Screen Options </strong>in the top right corner of the screen, and set the number in Show on Screen to something high, like 200. This functionality really adds to the elegance and amazing usability of WordPress.</p>
<p>Depending on which plugins you have installed, you&#8217;ll have different options in your Screen Options Panel. For example, we have <a href="http://yoast.com/wordpress/seo/">Yoast&#8217;s SEO Plugin</a> installed, so we can check or uncheck the checkboxes to show the plugin-related options in our Post/Page editing areas.</p>
<p>Here is a screenshot of how the Screen Options panel looks in WordPress.</p>
<p><img class="alignnone size-full wp-image-955" title="showscreen" src="http://wpgarage.com/wp-content/uploads/2011/05/showscreen1.png" alt="" width="500" height="103" /></p>
<p>This post was originally published at <a href="http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/">QuickTip: Show More Pages in your WordPress Dashboard</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/news-views/quicktip-show-more-pages-in-your-wordpress-screen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to list Pages with custom fields in 2 columns in WordPress</title>
		<link>http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/</link>
		<comments>http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 11:51:11 +0000</pubDate>
		<dc:creator>Rebecca Markowitz</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[Pages]]></category>

		<guid isPermaLink="false">?p=695</guid>
		<description><![CDATA[<p>Recently, I needed to list all subpages of a parent page.  I also needed to display custom fields below each subpage. And, on top of that, the list needed to be 2 columns. I found a solution for simply listing the pages in 2 columns, but it did not suggest how to modify the code [...]</p><p>This post was originally published at <a href="http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/">How to list Pages with custom fields in 2 columns in WordPress</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/" data-url="http://illum.in/oWCm4j" data-text="How to list Pages with custom fields in 2 columns in WordPress" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/"></g:plusone></div></div><p>Recently, I needed to list all subpages of a parent page.  I also needed to display custom fields below each subpage. And, on top of that, the list needed to be 2 columns.</p>
<p>I found a <a href="http://www.livexp.net/wordpress/display-list-of-wordpress-pages-in-two-columns.html">solution</a> for simply listing the pages in 2 columns, but it did not suggest how to modify the code to include custom fields.</p>
<p>So, thanks to our coding hero <a href="http://marksw.com/wordpress/">Mark Kaplun</a> who supplied the below code, although he admits it&#8217;s a &#8220;dirty hack&#8221;. The sort_column is so that MyPageOrder would work properly for this listing.</p>
<blockquote><p>&lt;?php<br />
$args = array(<br />
&#8216;post_type&#8217; =&gt; &#8216;page&#8217;,<br />
&#8216;numberposts&#8217; =&gt; 40,<br />
&#8216;sort_column&#8217; =&gt; &#8216;menu_order&#8217;,<br />
&#8216;child_of&#8217; =&gt; 84 // any parent<br />
);<br />
$attachments = get_pages($args);<br />
//print_r(&#8220;attachements:&#8221; . $attachements);<br />
echo &#8216;&lt;div style=&#8221;float: left; margin: 0 10px 0 0;&#8221;&gt;&#8217;;<br />
?&gt;</p>
<p>&lt;?php<br />
for ($i =0; $i&lt;count($attachments)/2; $i++) {<br />
$post = $attachments[$i];<br />
//    foreach ($attachments as $post)  { ?&gt;</p>
<p>&lt;a href=&#8221;&lt;?php echo get_permalink($post-&gt;ID) ?&gt;&#8221; rel=&#8221;bookmark&#8221;&gt;&lt;?php echo $post-&gt;post_title; ?&gt;&lt;/a&gt;<br />
&lt;?php if(get_post_meta($post-&gt;ID, &#8220;NameofCustomField&#8221;, true)) { ?&gt;<br />
&lt;?php<br />
echo get_post_meta($post-&gt;ID, &#8220;NameofCustomField&#8221;, true);<br />
}<br />
?&gt;<br />
&lt;?php } ?&gt;<br />
&lt;/div&gt;<br />
&lt;?php<br />
echo &#8216;&lt;div style=&#8221;float: left; margin: 0 10px 0 0;&#8221;&gt;&#8217;;<br />
for (; $i&lt;count($attachments); $i++) {<br />
$post = $attachments[$i];<br />
//    foreach ($attachments as $post)  { ?&gt;</p>
<p>&lt;a href=&#8221;&lt;?php echo get_permalink($post-&gt;ID) ?&gt;&#8221; rel=&#8221;bookmark&#8221;&gt;&lt;?php echo $post-&gt;post_title; ?&gt;&lt;/a&gt;<br />
&lt;?php if(get_post_meta($post-&gt;ID, &#8220;PracticeArea&#8221;, true)) { ?&gt;<br />
&lt;?php<br />
echo get_post_meta($post-&gt;ID, &#8220;PracticeArea&#8221;, true);<br />
}<br />
?&gt;<br />
&lt;?php } ?&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>This post was originally published at <a href="http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/">How to list Pages with custom fields in 2 columns in WordPress</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/how-to-list-pages-with-custom-fields-in-2-columns-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to Customize Multiple Search Result Pages in WordPress</title>
		<link>http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/</link>
		<comments>http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 07:26:02 +0000</pubDate>
		<dc:creator>Rebecca Markowitz</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[Pages]]></category>
		<category><![CDATA[results]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/?p=498</guid>
		<description><![CDATA[<p>In the previous post, we discussed how to hack the search function in WordPress to have an additional search form that would search  subcategories. Now that you have 2 or more search forms on your site, you might need to customize the search results. Thanks to this solution, I learned how to create multiple search [...]</p><p>This post was originally published at <a href="http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/">How to Customize Multiple Search Result Pages in WordPress</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/" data-url="http://illum.in/ocOae3" data-text="How to Customize Multiple Search Result Pages in WordPress" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/"></g:plusone></div></div><p>In the previous post, we discussed how to <a href="code-snippets/how-to-hack-the-wordpress-search-function-search-categories-and-child-categories/">hack the search function</a> in WordPress to have an additional search form that would search  subcategories. Now that you have 2 or more search forms on your site, you might need to customize the search results. Thanks to <a href="http://www.rob-barrett.com/post/multiple-search-results-pages-within-one-wordpress-site">this solution</a>, I learned how to create multiple search result pages.</p>
<p>Let&#8217;s say we have 2 search forms on our site:</p>
<ol>
<li>General Site-Wide Search</li>
<li>Recipe Search &#8211; searches subcategories of the Recipe Category</li>
</ol>
<p>The first thing we need to do is tweak the search.php template to use it as a filter that will recognize if a search is coming from the Site-Wide search form or the Recipe Search form.</p>
<p><strong>1. Open Search.php</strong> and delete everything.  Add the following code:</p>
<blockquote><p>&lt;?php<br />
/* Template Name: Search Results */<br />
$search_refer = $_GET["site_section"];<br />
if ($search_refer == &#8216;recipe&#8217;) { load_template(TEMPLATEPATH . &#8216;/recipe-search.php&#8217;); }<br />
elseif ($search_refer == &#8216;site-search&#8217;) { load_template(TEMPLATEPATH . &#8216;/site-search.php&#8217;); }; ?&gt;</p></blockquote>
<p><strong>2. Open Header.php</strong> or wherever the General Site-Wide Search Form is located and add this line:</p>
<blockquote><p>&lt;input type=&#8221;hidden&#8221; name=&#8221;site_section&#8221; value=&#8221;site-search&#8221; /&gt;</p></blockquote>
<p><strong>The Site-Wide Search form will look something like this:</strong></p>
<blockquote><p>&lt;form method=&#8221;get&#8221; id=&#8221;searchform&#8221; action=&#8221;&lt;?php bloginfo(&#8216;home&#8217;); ?&gt;/&#8221;&gt;<br />
&lt;div id=&#8221;search&#8221;&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221; &#8221; onclick=&#8221;this.value=&#8221;;&#8221; name=&#8221;s&#8221; id=&#8221;s&#8221; /&gt;<strong><br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;site_section&#8221; value=&#8221;site-search&#8221; /&gt;</strong><br />
&lt;input name=&#8221;" type=&#8221;image&#8221; src=&#8221;&lt;?php bloginfo(&#8216;stylesheet_directory&#8217;); ?&gt;/styles/&lt;?php echo &#8220;$style_path&#8221;; ?&gt;/search.gif&#8221; value=&#8221;Go&#8221; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;/search &#8211;&gt;<br />
&lt;/form&gt;</p></blockquote>
<p><strong>3. </strong><strong>Open Recipes.php</strong> or wherever your second search is and insert this line:</p>
<blockquote><p><strong>&lt;input type=&#8221;hidden&#8221; name=&#8221;site_section&#8221; value=&#8221;recipe&#8221; /&gt; </strong></p></blockquote>
<p>You can change the value &#8220;recipe&#8221; to whatever suits your needs. Just make sure it matches the value in search.php.</p>
<p><strong>The Recipe Search form for your second search</strong> <strong>will look something like this</strong>. In my case, this second search is meant to search the subcategories of the Recipe category.  See my previous post to learn about<a href="code-snippets/how-to-hack-the-wordpress-search-function-search-categories-and-child-categories/"> hacking the search function to search subcategories.</a></p>
<blockquote><p>&lt;form method=&#8221;get&#8221; id=&#8221;rsearchform&#8221; action=&#8221;&lt;?php bloginfo(&#8216;home&#8217;); ?&gt;/&#8221;&gt;<br />
&lt;div id=&#8221;rsearch&#8221;&gt;<br />
&lt;input type=&#8221;text&#8221; value=&#8221;Recipe Search&#8230; &#8221; onclick=&#8221;this.value=&#8221;;&#8221; name=&#8221;s&#8221; id=&#8221;rs&#8221; /&gt;<br />
&lt;?php $categories = get_categories(&#8216;child_of=11&#8242;);<br />
$catlist = &#8221;;<br />
foreach ($categories as $cat) {<br />
$catlist.= $cat-&gt;cat_ID.&#8217;,';<br />
}<br />
$catlist.&#8217;11&#8242;;<br />
?&gt;<br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;cat&#8221; value=&#8221;&lt;?php echo &#8220;$catlist&#8221;?&gt;&#8221; /&gt;<br />
<strong>&lt;input type=&#8221;hidden&#8221; name=&#8221;site_section&#8221; value=&#8221;recipe&#8221; /&gt; </strong><br />
&lt;input name=&#8221;" type=&#8221;image&#8221; src=&#8221;&lt;?php bloginfo(&#8216;stylesheet_directory&#8217;); ?&gt;/styles/&lt;?php echo &#8220;$style_path&#8221;; ?&gt;/search.gif&#8221; value=&#8221;Go&#8221; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;/search &#8211;&gt;<br />
&lt;/form&gt;</p></blockquote>
<p><strong>4. Customize the Search Results Templates</strong></p>
<p>If you recall, in step 1, we added the following to the search.php page.</p>
<blockquote><p>if ($search_refer == &#8216;recipe&#8217;) { load_template(TEMPLATEPATH . &#8216;/recipe-search.php&#8217;); }<br />
elseif ($search_refer == &#8216;site-search&#8217;) { load_template(TEMPLATEPATH . &#8216;/site-search.php&#8217;); }; ?&gt;</p></blockquote>
<p>Create recipe-search.php (or whatever you named this template) and customize the layout of the results page to your liking. You can use index.php to start with and customize from there.</p>
<p>Create site-search.php (or whatever you named this template) and customize the layout of the results page to your liking. You can use index.php to start with and customize from there.</p>
<p>This post was originally published at <a href="http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/">How to Customize Multiple Search Result Pages in WordPress</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/how-to-customize-multiple-search-result-pages-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to create a Simple Directory in WordPress using Grandparent, Parent, and Child Pages</title>
		<link>http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/</link>
		<comments>http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 10:04:13 +0000</pubDate>
		<dc:creator>Rebecca Markowitz</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[child]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[grandparent]]></category>
		<category><![CDATA[Pages]]></category>
		<category><![CDATA[parent]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/?p=464</guid>
		<description><![CDATA[<p>I wanted to create a simple directory of non-profit organizations. To do so,  I wanted to use pages for the directory, rather than posts so that I could separate the static directory listings from the dynamic blog posts. I didn&#8217;t want to have to exclude tons of categories from feedburner and the main loop. So, [...]</p><p>This post was originally published at <a href="http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/">How to create a Simple Directory in WordPress using Grandparent, Parent, and Child Pages</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/" data-url="http://illum.in/nehRIx" data-text="How to create a Simple Directory in WordPress using Grandparent, Parent, and Child Pages" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/"></g:plusone></div></div><p>I wanted to create a simple directory of non-profit organizations. To do so,   I wanted to use pages for the directory, rather than posts so that I could separate the static directory listings from the dynamic blog posts. I didn&#8217;t want to have to exclude tons of categories from feedburner and the main loop.</p>
<p>So, I started exploring the whole family in WordPress &#8211; grandparents, parents, and children. Translation for those not yet used to seeing WordPress analagous to the family in My Big Fat Greek Wedding: Pages, sub-pages, and sub-sub pages</p>
<p><strong>Simple Directory Setup<br />
</strong></p>
<ul>
<li>Directory Page (grandparent): Displays list of Non-Profit Organization Categories  (ex. social, environment, health, etc.)</li>
<li>Category Page (parent): Show title and excerpt of each Organization within a category (ex. Environment Organizations)</li>
<li>Single Organization Page (child/current): Show content about a single organization(ex.  SaveTheEarth &#8211; made up org for this example)</li>
</ul>
<p><strong>Here&#8217;s how to do it</strong></p>
<ol>
<li>Create a Page Called Directory. This will be the <strong>Directory Page</strong> (grandparent)</li>
<li>Find the Page ID. Let&#8217;s say the Page ID = 5. Depending on how you want to display the category info, you can</li>
<li> Manually add the name of each category, a short description and a link</li>
<li>Open up page.php so we can setup <strong>The Category Page</strong> (Parent Page). We want to show title and excerpts of each organization for each category.</li>
<li>Add this code to page.php &#8211; Checks if we&#8217;re on a sub page / child page of the Directory (Page ID =10) and if so, list the pages in alphabetical order with excerpts. For the excerpt, I&#8217;m using the plugin Limit Posts since it didn&#8217;t work with The Excerpt Reloaded.&lt;?php<br />
$current = $post-&gt;ID;<br />
$parent = $post-&gt;post_parent;<br />
$grandparent_get = get_post($parent);<br />
$grandparent = $grandparent_get-&gt;post_parent;<br />
?&gt;</p>
<p>&lt;?php if ( $post-&gt;post_parent==&#8221;10&#8243;   ){ ?&gt;<br />
&lt;?php $pageChildren = $wpdb-&gt;get_results(&#8220;SELECT *    FROM $wpdb-&gt;posts WHERE post_parent = &#8220;.$post-&gt;ID.&#8221;    AND post_type = &#8216;page&#8217; ORDER BY post_title ASC&#8221;, &#8216;OBJECT&#8217;);    ?&gt;</p>
<p>&lt;h2 class=&#8221;titles&#8221;&gt;&lt;a href=&#8221;&lt;? php echo get_permalink($pageChild-&gt;ID);  ?&gt;&#8221;&gt; &lt;? php echo $pageChild-&gt;post_title;  ?&gt;&lt;/a&gt;&lt;/h2&gt;</p>
<p>&lt;?php the_content_limit(280, &#8220;&#8221;); ?&gt;&lt;div class=&#8221;readmore&#8221;&gt;&lt;a href=&#8221;&lt;?php echo get_permalink($pageChild-&gt;ID); ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;Permanent Link to &lt;? php echo $pageChild-&gt;post_title;   ?&gt;&#8221;&gt;Read More &amp;raquo;&lt;/a&gt;&lt;/div&gt;</p>
<p>(make sure to delete the space between &lt;? and php -  I had to to do that so it wouldn&#8217;t execute in this post)</li>
<li><strong>Single Organization Page </strong>(Child Page) On page.php, after the code you added in step 5, add this code that will check to see if we&#8217;re on the grandchild page. This will be the actual organization&#8217;s page. In our example, the SaveTheEarth Page. This is very helpful information in case you want to add a different style or add special items in the sidebar, etc.<br />
&lt;?php if ( $pageChildren ) : foreach ( $pageChildren as $pageChild ) : setup_postdata( $pageChild ); ?&gt;</li>
</ol>
<p style="padding-left: 30px;">7. Set up how the rest of the pages on your site will look:</p>
<p style="padding-left: 30px;">On page.php, after the code in step 6, add this code which instructs every other page in the site to act normally and display the content</p>
<p style="padding-left: 30px;">&lt;?php endforeach; ?&gt;<br />
&lt;?php else : ?&gt;</p>
<p style="padding-left: 30px;">&lt;?php the_content(); ?&gt;<br />
&lt;?php  endif; ?&gt;</p>
<p style="padding-left: 30px;">
<p><strong>You can see the full page.php code <a href="wp-content/uploads/2009/06/page.txt">here</a></strong></p>
<p><strong>You can see the directory in action <a href="http://israelnonprofitnews.com/directory/">here</a><br />
</strong></p>
<p>I figured this out using the following helpful posts:</p>
<p>*<a href="http://wordpress.org/support/topic/186206"> http://wordpress.org/support/topic/186206</a><br />
* <a href="http://wpguru.co.za/page/display-title-excerpt-of-child-page">http://wpguru.co.za/page/display-title-excerpt-of-child-page</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/">How to create a Simple Directory in WordPress using Grandparent, Parent, and Child Pages</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/how-to-create-a-simple-directory-in-wordpress-using-grandparent-parent-and-child-pages/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Adding Microsoft Live Search Maps to your WordPress blog</title>
		<link>http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/</link>
		<comments>http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 20:08:05 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Shorties]]></category>
		<category><![CDATA[Pages]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/</guid>
		<description><![CDATA[<p>You can add a Microsoft Live Map to your WordPress blog pretty easily. All you have to do is create a custom template Page for the map page, and add some code to it. Full instructions are here. Live Search Maps for WordPress</p><p>This post was originally published at <a href="http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/">Adding Microsoft Live Search Maps to your WordPress blog</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/" data-url="http://illum.in/riehro" data-text="Adding Microsoft Live Search Maps to your WordPress blog" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/"></g:plusone></div></div><p>You can add a <a href="http://maps.live.com/" title="Microsoft Live Search Maps">Microsoft Live Map</a> to your <a href="http://wordpress.org" title="WordPress">WordPress</a> blog pretty easily. All you have to do is create a <a href="http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates" title="Creating your own WordPress Page Templates">custom template Page</a> for the map page, and add some code to it. Full instructions are <a href="http://virtualearth.spaces.live.com/Blog/cns!2BBC66E99FDCDB98!10583.entry" title="Live Search Maps for WordPress">here</a>.</p>
<p><a href="http://virtualearth.spaces.live.com/Blog/cns!2BBC66E99FDCDB98!10583.entry" title="Live Search Maps for WordPress">Live Search Maps for WordPress</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/">Adding Microsoft Live Search Maps to your WordPress blog</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/shorties/adding-microsoft-live-search-maps-to-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress plugin easily creates drop-down navigation</title>
		<link>http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/</link>
		<comments>http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 09:40:48 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[Pages]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/</guid>
		<description><![CDATA[<p>This is really handy: the Drop Down Menu WordPress plugin creates a drop-down navigation scheme where sub-pages appear under their parent pages in the menu. All you have to do is upload, activate, and add one snippet of code to your template files. The menu can be styled in the styles.css file in the plugin&#8217;s [...]</p><p>This post was originally published at <a href="http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/">WordPress plugin easily creates drop-down navigation</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/" data-url="http://illum.in/qYb7hR" data-text="WordPress plugin easily creates drop-down navigation" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/"></g:plusone></div></div><p>This is really handy: the <a href="http://www.weeatbricks.com/2008/01/07/new-wordpress-plugin-for-creating-a-drop-down-navigation-menu-using-jquery/" title="Drop Down Menu WordPress plugin">Drop Down Menu WordPress plugin</a> creates a drop-down navigation scheme where sub-pages appear under their parent pages in the menu. All you have to do is upload, activate, and add one snippet of code to your template files.  The menu can be styled in the styles.css file in the plugin&#8217;s folder.</p>
<p>See the demo <a href="http://throwingshapes.net/hp_wordpress/" title="Drop Down Menu WordPress plugin demo">here</a>.</p>
<p><a href="http://www.weeatbricks.com/2008/01/07/new-wordpress-plugin-for-creating-a-drop-down-navigation-menu-using-jquery/">WordPress plugin for creating a drop down navigation menu using JQuery»</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/">WordPress plugin easily creates drop-down navigation</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/wordpress-plugin-easily-creates-drop-down-navigation/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Manually order your Pages with My Page Order WordPress plugin</title>
		<link>http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/</link>
		<comments>http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 08:35:45 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[Pages]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/</guid>
		<description><![CDATA[<p>Recently I wrote about a WordPress plugin that allows you to exclude certain pages from appearing in your list of Pages without coding your template files. The My Page Order WordPress plugin gives you additional Page flexibility by allowing you to manually order your Pages without coding. Update Feb. 17, 2008: I just used this [...]</p><p>This post was originally published at <a href="http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/">Manually order your Pages with My Page Order WordPress plugin</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/" data-url="http://illum.in/pGyOBQ" data-text="Manually order your Pages with My Page Order WordPress plugin" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/"></g:plusone></div></div><p>Recently I wrote about a WordPress plugin that allows you to exclude certain pages from appearing in your list of Pages without coding your template files. The <a href="http://geekyweekly.com/mypageorder" title="My Page Order WordPress plugin">My Page Order WordPress plugin</a> gives you additional Page flexibility by allowing you to manually order your Pages without coding.</p>
<p><em>Update Feb. 17, 2008:</em></p>
<p>I just used this plugin for the first time, and it&#8217;s fantastic! All you have to do is upload it and activate it, and then go to Manage &gt; My Page Order. There, you have an Ajaxy menu that shows you all your pages. You just drag and drop them until they&#8217;re in the order you want, and then click the &#8220;Click to Order Pages&#8221; button. You can also order subpages in the same way.</p>
<p><img src="http://wpgarage.com/wp-content/uploads/2008/02/mypageorderwordpressplugin.png" alt="My Page Order WordPress Plugin" /></p>
<p>This is a plugin that can save you tons of time when you have five or more pages that you need to reorder.</p>
<p><a href="http://geekyweekly.com/mypageorder">My Page Order WordPress plugin<br />
</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/">Manually order your Pages with My Page Order WordPress plugin</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/manually-order-your-pages-with-my-page-order-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Page Link Manager WordPress plugin: exclude Pages without coding</title>
		<link>http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/</link>
		<comments>http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 08:27:00 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[Pages]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/</guid>
		<description><![CDATA[<p>The Page Link Manager WordPress plugin creates a place in your admin where you can select which Pages will appear in your list of pages, and which will be excluded. This means that your clients can easily do this themselves, and it saves you a bit of trouble too. Garrett Murphey » WordPress Plugin: Page [...]</p><p>This post was originally published at <a href="http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/">Page Link Manager WordPress plugin: exclude Pages without coding</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/" data-url="http://illum.in/mORsXN" data-text="Page Link Manager WordPress plugin: exclude Pages without coding" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/"></g:plusone></div></div><p>The <a href="http://gmurphey.com/2006/10/05/wordpress-plugin-page-link-manager/" title="Page Link Manager plugin">Page Link Manager WordPress plugin</a> creates a place in your admin where you can select which Pages will appear in your list of pages, and which will be excluded. This means that your clients can easily do this themselves, and it saves you a bit of trouble too.</p>
<p><a href="http://gmurphey.com/2006/10/05/wordpress-plugin-page-link-manager/">Garrett Murphey » WordPress Plugin: Page Link Manager</a></p>
<p>This post was originally published at <a href="http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/">Page Link Manager WordPress plugin: exclude Pages without coding</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/plugins/page-link-manager-wordpress-plugin-exclude-pages-without-coding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress challenge: getting class current_page_item to work when home page is not blog</title>
		<link>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/</link>
		<comments>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 08:30:18 +0000</pubDate>
		<dc:creator>Miriam Schwab</dc:creator>
				<category><![CDATA[WordPress as CMS]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[Pages]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/</guid>
		<description><![CDATA[<p>Sorry for the confusing title, but there is an issue that we face over and over when using WordPress as a CMS, and have not been able to solve. When we are using WordPress as a CMS, our Blog page doesn&#8217;t pick up the current_page_item class and therefore its link on the nav bar isn&#8217;t [...]</p><p>This post was originally published at <a href="http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/">WordPress challenge: getting class current_page_item to work when home page is not blog</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/" data-url="http://illum.in/rbBZfU" data-text="WordPress challenge: getting class current_page_item to work when home page is not blog" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/"></g:plusone></div></div><p>Sorry for the confusing title, but there is an issue that we face over and over when using <a href="category/wordpress-as-cms/" title="WordPress as CMS category on WordPressGarage">WordPress as a CMS</a>, and have not been able to solve. When we are using WordPress as a CMS, our Blog page doesn&#8217;t pick up the current_page_item class and therefore its link on the nav bar isn&#8217;t highlighted like the other pages are. How can we get it to change?</p>
<p>I know that the above might not make sense, so here is a detailed description of the problem:</p>
<p>If you use WordPress as a CMS, you generally create the Pages you want to appear on your nav bar under Write &gt; Write Page. One of those Pages is the Home page, for example, and you create another Page for your blog posts called Blog. Then,  you go to Options &gt; Reading, and select one of those pages for your front page from the drop-down list, in this case you would select the Home page, and another page for your blog posts, in this case the Blog page.</p>
<p><img src="http://wpgarage.com/wp-content/uploads/2007/12/options-read1.png" alt="options-read1.png" /></p>
<p>You create a style in your style sheet called current_page_item which causes the current page that the viewer is on to appear differently in the nav bar or list of pages. For example, you want the background color of that page on the nav bar to change from green to purple.</p>
<p>Now, here&#8217;s where the problem lies: all pages on the nav bar change from green to purple when the user is on that page&#8230;except the Blog page! For some reason, that Blog page does not pick up the current_page_item class.</p>
<p>So my question is: does anyone know of a solution to this problem?</p>
<p>Thanks!</p>
<p>This post was originally published at <a href="http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/">WordPress challenge: getting class current_page_item to work when home page is not blog</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/wordpress-as-cms/wordpress-challenge-getting-class-current_page_item-to-work-when-home-page-is-not-blog/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Creating different Page templates</title>
		<link>http://wpgarage.com/code-snippets/creating-different-page-templates/</link>
		<comments>http://wpgarage.com/code-snippets/creating-different-page-templates/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 14:10:44 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Pages]]></category>

		<guid isPermaLink="false">http://wordpressgarage.com/code-snippets/creating-different-page-templates/</guid>
		<description><![CDATA[<p>To create a new Page template, add the following code to the top of the page: &#60;?php /* Template Name: Home */ ?&#62; The Template Name can be changed, i.e. Home can be About Us, or anything else. When you create a Page in WordPress, on the right-hand side there is a drop down box [...]</p><p>This post was originally published at <a href="http://wpgarage.com/code-snippets/creating-different-page-templates/">Creating different Page templates</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:right;"><div class="socialize-in-button socialize-in-button-right"><a href="http://twitter.com/share" class="twitter-share-button" data-counturl="http://wpgarage.com/code-snippets/creating-different-page-templates/" data-url="http://illum.in/rripPQ" data-text="Creating different Page templates" data-count="vertical" data-via="wpgarage" data-related="wpgarage"><!--Tweetter--></a></div><div class="socialize-in-button socialize-in-button-right"><iframe src="http://www.facebook.com/plugins/like.php?href=http://wpgarage.com/code-snippets/creating-different-page-templates/&amp;layout=box_count&amp;show_faces=true&amp;width=50&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px !important; height:65px;" allowTransparency="true"></iframe></div><div class="socialize-in-button socialize-in-button-right"><g:plusone size="tall" href="http://wpgarage.com/code-snippets/creating-different-page-templates/"></g:plusone></div></div><p>To create a new Page template, add the following code to the top of the page:</p>
<p><code>&lt;?php<br />
/*<br />
Template Name: Home<br />
*/<br />
?&gt;</code></p>
<p>The Template Name can be changed, i.e. Home can be About Us, or anything else. When you create a Page in WordPress, on the right-hand side there is a drop down box for selecting a template. The name that you enter in the above code is what will appear there.</p>
<p>This post was originally published at <a href="http://wpgarage.com/code-snippets/creating-different-page-templates/">Creating different Page templates</a> on <a href="http://wpgarage.com">WP Garage</a> - <a href="http://wpgarage.com">WP Garage - wordpress tricks, hacks, and tips</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wpgarage.com/code-snippets/creating-different-page-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

