<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: Including Specific Pages in Menu</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Wed, 19 Jun 2013 10:15:49 +0000</pubDate>

<item>
<title>ryans213 on "Including Specific Pages in Menu"</title>
<link>http://themeshaper.com/forums/topic/including-specific-pages-in-menu#post-10778</link>
<pubDate>Wed, 17 Mar 2010 15:31:12 +0000</pubDate>
<dc:creator>ryans213</dc:creator>
<guid isPermaLink="false">10778@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I still have not resolved this issue unfortunately. :( I looked into arguments and the closest thing I found was the exclude_tree. Really I almost need an include_tree argument. I discovered I am not alone in that wish. My problem isn't getting a navigation up with links, the problem is when there are new pages added. I need to be able to not have the navigation grow as the site demands more pages. &#60;/p&#62;
&#60;p&#62;Here is a Wordpress support post that has as close to a solution as I have found. &#60;a href=&#34;http://wordpress.org/support/topic/287555&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/support/topic/287555&#60;/a&#62;&#60;/p&#62;
&#60;blockquote&#62;
&#60;p&#62;Here is a workaround. I started with an array of pages IDs I want to include. I loop through that array, displaying each parent page. I then call wp_list_pages again, looking for the child pages, and add them if they exist.&#60;/p&#62;
&#60;p&#62;$page_ids = array(1,2,3);&#60;br /&#62;
foreach($page_ids as $page_id) {&#60;br /&#62;
  $page = wp_list_pages(&#34;echo=0&#38;#38;title_li=&#38;#38;include=$page_id&#34;);&#60;br /&#62;
  $submenu = wp_list_pages(&#34;echo=0&#38;#38;title_li=&#38;#38;child_of=$page_id&#38;#38;depth=1&#34;);&#60;br /&#62;
  if($submenu) $page = str_replace(&#34;&#34;, &#34;
&#60;ul&#62;$submenu&#60;/ul&#62;
&#34;, $page);&#60;br /&#62;
  echo $page;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;This code is very clunky, and calls the wp_list_pages multiple times, doing what I assume will be multiple database calls. Not very efficient or pretty, IMO. At least it does the trick for now.&#60;/p&#62;
&#60;p&#62;The ideal solution would be to have an &#34;include_tree&#34; parameter for the wp_list_pages function.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Is there a better way to do it? I also am trying to account for the superfish menu.
&#60;/p&#62;</description>
</item>
<item>
<title>ryans213 on "Including Specific Pages in Menu"</title>
<link>http://themeshaper.com/forums/topic/including-specific-pages-in-menu#post-10568</link>
<pubDate>Mon, 08 Mar 2010 21:57:20 +0000</pubDate>
<dc:creator>ryans213</dc:creator>
<guid isPermaLink="false">10568@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;The information Chris provided is oh so close to what I want to achieve. Thank you Chris.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
function childtheme_menu_args($args)&#60;br /&#62;
{&#60;br /&#62;
    $args = array('show_home' =&#38;gt; 'Start', 'sort_column' =&#38;gt; 'menu_order',&#60;br /&#62;
        'menu_class' =&#38;gt; 'menu', 'echo' =&#38;gt; true, 'include' =&#38;gt; '413, 313');&#60;br /&#62;
    return $args;&#60;br /&#62;
}&#60;br /&#62;
add_filter('wp_page_menu_args', 'childtheme_menu_args');
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;The problem with this, and I think CRGO alluded to it, how do I account for the child pages for the navigational links that have a sub menu? For example I need the child page for 313 to show up when I roll over it. I'm sure this is something someone has tackled already given the diversity of Thematic themes out there. Any assistance with this will be greatly appreciated. :)
&#60;/p&#62;</description>
</item>
<item>
<title>em hr on "Including Specific Pages in Menu"</title>
<link>http://themeshaper.com/forums/topic/including-specific-pages-in-menu#post-7004</link>
<pubDate>Fri, 09 Oct 2009 00:28:00 +0000</pubDate>
<dc:creator>em hr</dc:creator>
<guid isPermaLink="false">7004@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Not sure exactly what you mean but look here for more insight on the arguments you can add to this filter&#60;/p&#62;
&#60;p&#62; &#60;a href=&#34;http://codex.wordpress.org/Template_Tags/wp_page_menu&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Template_Tags/wp_page_menu&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;-Gene
&#60;/p&#62;</description>
</item>
<item>
<title>crgo on "Including Specific Pages in Menu"</title>
<link>http://themeshaper.com/forums/topic/including-specific-pages-in-menu#post-6923</link>
<pubDate>Sun, 04 Oct 2009 20:24:27 +0000</pubDate>
<dc:creator>crgo</dc:creator>
<guid isPermaLink="false">6923@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;How do you include the page and leep the child pages so it opens up in the navigation as well.
&#60;/p&#62;</description>
</item>
<item>
<title>EvilEsq on "Including Specific Pages in Menu"</title>
<link>http://themeshaper.com/forums/topic/including-specific-pages-in-menu#post-3546</link>
<pubDate>Sun, 26 Apr 2009 18:04:00 +0000</pubDate>
<dc:creator>EvilEsq</dc:creator>
<guid isPermaLink="false">3546@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Viola! Works perfectly now. Thank you very much.
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "Including Specific Pages in Menu"</title>
<link>http://themeshaper.com/forums/topic/including-specific-pages-in-menu#post-3541</link>
<pubDate>Sun, 26 Apr 2009 13:09:28 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">3541@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hey,&#60;/p&#62;
&#60;p&#62;try this code in your child theme's functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_menu_args($args)
{
    $args = array(&#38;#39;show_home&#38;#39; =&#38;gt; &#38;#39;Start&#38;#39;, &#38;#39;sort_column&#38;#39; =&#38;gt; &#38;#39;menu_order&#38;#39;,
        &#38;#39;menu_class&#38;#39; =&#38;gt; &#38;#39;menu&#38;#39;, &#38;#39;echo&#38;#39; =&#38;gt; true, &#38;#39;include&#38;#39; =&#38;gt; &#38;#39;413, 313&#38;#39;);
    return $args;
}
add_filter(&#38;#39;wp_page_menu_args&#38;#39;, &#38;#39;childtheme_menu_args&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Change the value for include to your needs.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>EvilEsq on "Including Specific Pages in Menu"</title>
<link>http://themeshaper.com/forums/topic/including-specific-pages-in-menu#post-3538</link>
<pubDate>Sun, 26 Apr 2009 07:35:48 +0000</pubDate>
<dc:creator>EvilEsq</dc:creator>
<guid isPermaLink="false">3538@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I want to include a 'Home' page and only specific top level pages in the menu. I've done this in another theme by adding the following statement in the header:&#60;/p&#62;
&#60;p&#62;(show_home='Home'&#38;#38;include=3,4,5,8,9&#38;#38;sort_column=menu_order')&#60;/p&#62;
&#60;p&#62;but can't figure out how to make it work with the array function in the child theme function.&#60;/p&#62;
&#60;p&#62;Can anyone direct me?  Thanks in advance!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
