<?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: Putting Dynamic classes BACK into Sub-Titled Menu Links</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Thu, 09 Feb 2012 04:41:11 +0000</pubDate>

<item>
<title>BAC on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-9872</link>
<pubDate>Tue, 16 Feb 2010 21:01:07 +0000</pubDate>
<dc:creator>BAC</dc:creator>
<guid isPermaLink="false">9872@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;If anyone wants a very simple fix for this problem which solves the database request issue.&#60;/p&#62;
&#60;p&#62;1. Install the All in One SEO Pack plugin&#60;/p&#62;
&#60;p&#62;2. Edit relevant page, i.e. home page and look for Menu Label. Add a span tag after the menu label text, and include the subtitle within a span:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;Home &#38;lt;span&#38;gt; about us &#38;lt;/span&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;3. put the following CSS within style.css in your child theme &#60;/p&#62;
&#60;p&#62;&#60;code&#62;li.page_item span {&#60;br /&#62;
display:block;&#60;br /&#62;
font-size:.7em;&#60;br /&#62;
}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Hope this helps.&#60;/p&#62;
&#60;p&#62;BAC
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4959</link>
<pubDate>Mon, 06 Jul 2009 18:03:55 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">4959@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Let's call it the next version ;)&#60;/p&#62;
&#60;p&#62;There'll be some major changes .. I prefer a 0.9.x&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4953</link>
<pubDate>Mon, 06 Jul 2009 15:30:33 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">4953@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Great, thanks Chris. I'll keep checking the forum regularly for your code/plugin, I'm assuming teh optimizations you're planning  are for 1.0?
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4924</link>
<pubDate>Sat, 04 Jul 2009 17:08:07 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">4924@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Anthony .. I'm sorry that I wasn't very communicative 'bout your request.&#60;/p&#62;
&#60;p&#62;I'm still not sure how this could be done without adding a lot of overhead due to the necessary data base requests.&#60;/p&#62;
&#60;p&#62;Currently I'm working on some optimizations for Thematic. If this works out as planned, I can write a plugin / code for the functions.php that does whatever you want to the menu without adding overhead to the sql server. The only overhead would be the pure php code.&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4879</link>
<pubDate>Thu, 02 Jul 2009 15:47:46 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">4879@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi Chris,&#60;br /&#62;
Thank you for your consideration! Whenever you can find the time to help with this, it will be greatly appreciated.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Anthony &#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
.. if you could wait 'til the weekend?! .. finished my office move today and need two more days to get my work done from the last couple of days.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris&#60;br /&#62;
Posted 4 weeks ago #&#60;/p&#62;
&#60;/blockquote&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4630</link>
<pubDate>Thu, 18 Jun 2009 14:57:13 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">4630@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Does anyone have any idea how to do this?
&#60;/p&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4570</link>
<pubDate>Tue, 16 Jun 2009 14:16:45 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">4570@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi Chris,&#60;br /&#62;
I was wondering about the status of this, I cant seem to figure it out. Thanks in advance for your help.
&#60;/p&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4470</link>
<pubDate>Thu, 11 Jun 2009 02:00:25 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">4470@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi Chris,&#60;br /&#62;
Thank you for your consideration! Whenever you can find the time to help with this, it will be greatly appreciated. &#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Anthony
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4275</link>
<pubDate>Wed, 03 Jun 2009 19:01:17 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">4275@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;.. if you could wait 'til the weekend?! .. finished my office move today and need two more days to get my work done from the last couple of days.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4209</link>
<pubDate>Mon, 01 Jun 2009 14:38:45 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">4209@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;HI, Chris, I was wondering if there is any way to add an id or class to each list item generated by the 'sub_page_list' function - I've tried adding post_ID, page_ID, and any other combination of tags I could find. Is there a way to generate a class or id on each menu list item that I could use for targeted css styling
&#60;/p&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4075</link>
<pubDate>Tue, 26 May 2009 13:13:13 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">4075@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi Chris, Thanks for your reply. Do you have nay direction or suggestions on how I could modify the script to put the dynamic classes back into the LI?&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;-Anthony
&#60;/p&#62;</description>
</item>
<item>
<title>Chris on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-4017</link>
<pubDate>Sat, 23 May 2009 13:09:09 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">4017@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;This code is only working on the top-level menu .. see 4th sql line: p.post_parent = 0&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>anthonycalzadilla on "Putting Dynamic classes BACK into Sub-Titled Menu Links"</title>
<link>http://themeshaper.com/forums/topic/putting-dynamic-classes-back-into-sub-titled-menu-links#post-3987</link>
<pubDate>Fri, 22 May 2009 04:56:29 +0000</pubDate>
<dc:creator>anthonycalzadilla</dc:creator>
<guid isPermaLink="false">3987@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hello All, I've been lurking here for awhile now. I need some help. Usually I can find what I'm searching for just by doing a few searches here. This time I cant. I recently implemented the &#34;Adding Sub-Titles To Menu Links&#34; technique. Its works great except it strips the navigational list items of their dynamic classes. &#60;/p&#62;
&#60;p&#62;Here is the code Ian provides:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// Adds descriptive text to link titles
// With help from &#60;a href=&#34;http://blog.clearskys.net/2008/12/17/how-to-adding-menu-sub-titles-to-a-theme/&#34; rel=&#34;nofollow&#34;&#62;http://blog.clearskys.net/2008/12/17/how-to-adding-menu-sub-titles-to-a-theme/&#60;/a&#62;
function sub_page_list() {
	global $wpdb;
	$sql = &#38;quot;SELECT p.ID, p.post_title, p.guid, pm.meta_value FROM &#38;quot; . $wpdb-&#38;gt;posts . &#38;quot; AS p LEFT JOIN &#38;quot;;
	$sql .= &#38;quot;(SELECT post_id, meta_value FROM &#38;quot; . $wpdb-&#38;gt;postmeta . &#38;quot; AS ipm WHERE meta_key = &#38;#39;subtitle&#38;#39;) &#38;quot;;
	$sql .= &#38;quot;AS pm ON p.ID = pm.post_id &#38;quot;;
	$sql .= &#38;quot;WHERE p.post_type = &#38;#39;page&#38;#39; AND p.post_parent = 0 AND p.post_status = &#38;#39;publish&#38;#39; &#38;quot;;
	$sql .= &#38;quot;ORDER BY p.menu_order ASC &#38;quot;;
	$sql .= &#38;quot;LIMIT 0, 10&#38;quot;;
	$rows = $wpdb-&#38;gt;get_results($sql,OBJECT);
	if($rows) {
		foreach($rows as $row) {
			echo &#38;quot;&#38;lt;li&#38;gt;&#38;quot;;
			$link_url = get_permalink($row-&#38;gt;ID);
			echo &#38;quot;&#38;lt;a href=\&#38;quot;$link_url\&#38;quot;&#38;quot; . &#38;quot;\&#38;quot;&#38;gt;$row-&#38;gt;post_title&#38;lt;/a&#38;gt;&#38;quot;;
			echo &#38;quot;&#38;lt;span style=\&#38;quot;display:block;\&#38;quot;&#38;gt;$row-&#38;gt;meta_value&#38;lt;/span&#38;gt;&#38;quot;;
			echo &#38;quot;&#38;lt;/li&#38;gt;&#38;quot;;
		}
	}
}

// Filter the menu to add the list
function childtheme_page_menu() { ?&#38;gt;
    &#38;lt;div class=&#38;quot;menu&#38;quot;&#38;gt;
        &#38;lt;ul&#38;gt;
            &#38;lt;?php if (is_front_page()) { ?&#38;gt;
            &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php bloginfo(&#38;#39;home&#38;#39;) ?&#38;gt;/&#38;quot; title=&#38;quot;&#38;lt;?php echo wp_specialchars( get_bloginfo(&#38;#39;name&#38;#39;), 1 ) ?&#38;gt;&#38;quot; rel=&#38;quot;home&#38;quot;&#38;gt;
                Home &#38;lt;span style=&#38;quot;display:block;&#38;quot;&#38;gt;This is the home page&#38;lt;/span&#38;gt;
            &#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
            &#38;lt;?php } else { ?&#38;gt;
            &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php bloginfo(&#38;#39;home&#38;#39;) ?&#38;gt;/&#38;quot; title=&#38;quot;&#38;lt;?php echo wp_specialchars( get_bloginfo(&#38;#39;name&#38;#39;), 1 ) ?&#38;gt;&#38;quot; rel=&#38;quot;home&#38;quot;&#38;gt;
                Home &#38;lt;span style=&#38;quot;display:block;&#38;quot;&#38;gt;Return to the home page&#38;lt;/span&#38;gt;
            &#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
            &#38;lt;?php } ?&#38;gt;

            &#38;lt;?php sub_page_list(); ?&#38;gt;

        &#38;lt;/ul&#38;gt;
    &#38;lt;/div&#38;gt;
&#38;lt;?php }
add_filter(&#38;#39;wp_page_menu&#38;#39;,&#38;#39;childtheme_page_menu&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I thought I could get it to work by changing the opening li tag like this, but it just didnt work. Can someone please point out what I'm doing wrong?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($rows) {
		foreach($rows as $row) {
			echo &#38;quot;&#38;lt;li class=&#38;quot;/post-&#38;lt;?php the_ID(); ?&#38;gt;/&#38;quot;&#38;gt;&#38;quot;;
			$link_url = get_permalink($row-&#38;gt;ID);
			echo &#38;quot;&#38;lt;a href=\&#38;quot;$link_url\&#38;quot;&#38;quot; . &#38;quot;\&#38;quot;&#38;gt;$row-&#38;gt;post_title&#38;lt;/a&#38;gt;&#38;quot;;
			echo &#38;quot;&#38;lt;span style=\&#38;quot;display:block;\&#38;quot;&#38;gt;$row-&#38;gt;meta_value&#38;lt;/span&#38;gt;&#38;quot;;
			echo &#38;quot;&#38;lt;/li&#38;gt;&#38;quot;;
		}
	}
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>

</channel>
</rss>

