<?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>DJS Consulting Tech Blog &#187; JavaScript</title>
	<atom:link href="http://techblog.djs-consulting.com/category/programming/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://techblog.djs-consulting.com</link>
	<description>Technical Information You Can Use</description>
	<lastBuildDate>Mon, 02 Jan 2012 18:44:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Category Drop-Down in WordPress</title>
		<link>http://techblog.djs-consulting.com/2007/category-drop-down-in-wordpress.html</link>
		<comments>http://techblog.djs-consulting.com/2007/category-drop-down-in-wordpress.html#comments</comments>
		<pubDate>Thu, 24 May 2007 15:00:15 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[dropdown]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://techblog.johnson/?p=83</guid>
		<description><![CDATA[WordPress provides a template tag, wp_dropdown_categories, that inserts a drop-down list (the HTML &#60;select&#62; element) of categories, where the value of each item is the ID from the database. This works fine if you are not using rewrite rules (AKA &#8230; <a href="http://techblog.djs-consulting.com/2007/category-drop-down-in-wordpress.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="WordPress" href="http://wordpress.org">WordPress</a> provides a <a title="Template Tags - WordPress Codex" href="http://codex.wordpress.org/Template_Tags">template tag</a>, <a title="wp_dropdown_categories - WordPress Codex" href="http://codex.wordpress.org/Template_Tags/wp_dropdown_categories">wp_dropdown_categories</a>, that inserts a drop-down list (the HTML &lt;select&gt; element) of categories, where the value of each item is the ID from the database. This works fine if you are not using rewrite rules (AKA &#8220;pretty links&#8221;) &#8211; you can construct a URL using the value (?cat=[number]). However, if you use any sort of rewrite rules, this does not work. I recently converted my <a title="Daniel J. Summers" href="http://daniel.summershome.org">personal site</a>, which uses the Pool theme, to utilize a JavaScript array to assist with displaying category pages.</p>
<p>Here&#8217;s the code&#8230;</p>
<p><em>Edit: Code has been moved to <a title="Posting Source Code in WordPress, Take 2 • DJS Consulting Tech Blog" href="/2007/posting-source-code-in-wordpress-take-2.html">this post</a>.</em></p>
<p>This works for both &#8220;pretty&#8221; and standard links, as it uses the template tag <a title="get_category_link - WordPress Codex" href="http://codex.wordpress.org/Function_Reference/get_category_link">get_category_link</a> to specify the link.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.djs-consulting.com/2007/category-drop-down-in-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

