<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WordPress Custom Taxonomy Input Panels</title>
	<atom:link href="http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/feed" rel="self" type="application/rss+xml" />
	<link>http://shibashake.com/wordpress-theme</link>
	<description>Dynamic WordPress Theme</description>
	<lastBuildDate>Fri, 30 Jul 2010 03:42:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: ShibaShake</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1884</link>
		<dc:creator>ShibaShake</dc:creator>
		<pubDate>Fri, 30 Jul 2010 03:15:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1884</guid>
		<description>&lt;blockquote&gt;But since I need a lot of meat boxes for my data inputs, I guess the best solution is to set up a master array containing the parameters for each meta box and then loop through a constructor function?&lt;/blockquote&gt;

Yeah that makes a lot of sense. It is what I normally do in my plugins.</description>
		<content:encoded><![CDATA[<blockquote><p>But since I need a lot of meat boxes for my data inputs, I guess the best solution is to set up a master array containing the parameters for each meta box and then loop through a constructor function?</p></blockquote>
<p>Yeah that makes a lot of sense. It is what I normally do in my plugins.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuwanda</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1879</link>
		<dc:creator>Nuwanda</dc:creator>
		<pubDate>Thu, 29 Jul 2010 22:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1879</guid>
		<description>Thanks for this, Shiba. It answered a lot of questions.

I&#039;m designing a small real estate site and decided to used custom taxonomies for the property listing data: price, bedrooms, etc. Of course the standard taxonomy checkbox interface was useless as I need a variety of inputs. This article was a big help.

But since I need a lot of meat boxes for my data inputs, I guess the best solution is to set up a master array containing the parameters for each meta box and then loop through a constructor function?

Else I end up with a very long script.</description>
		<content:encoded><![CDATA[<p>Thanks for this, Shiba. It answered a lot of questions.</p>
<p>I&#8217;m designing a small real estate site and decided to used custom taxonomies for the property listing data: price, bedrooms, etc. Of course the standard taxonomy checkbox interface was useless as I need a variety of inputs. This article was a big help.</p>
<p>But since I need a lot of meat boxes for my data inputs, I guess the best solution is to set up a master array containing the parameters for each meta box and then loop through a constructor function?</p>
<p>Else I end up with a very long script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ShibaShake</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1693</link>
		<dc:creator>ShibaShake</dc:creator>
		<pubDate>Wed, 23 Jun 2010 14:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1693</guid>
		<description>Thanks for the fix Adam. I have included it in the article above.</description>
		<content:encoded><![CDATA[<p>Thanks for the fix Adam. I have included it in the article above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adam</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1684</link>
		<dc:creator>adam</dc:creator>
		<pubDate>Tue, 22 Jun 2010 21:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1684</guid>
		<description>in part 2, your code on line #22, I had to change &lt;code&gt;theme-&gt;name&lt;/code&gt; to &lt;code&gt;theme-&gt;slug&lt;/code&gt; for use with a hierarchical taxonomy.  Otherwise it kept creating new terms.</description>
		<content:encoded><![CDATA[<p>in part 2, your code on line #22, I had to change <code>theme-&gt;name</code> to <code>theme-&gt;slug</code> for use with a hierarchical taxonomy.  Otherwise it kept creating new terms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1537</link>
		<dc:creator>Charlie</dc:creator>
		<pubDate>Fri, 21 May 2010 11:43:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1537</guid>
		<description>I&#039;ll give that a go and see how I get on</description>
		<content:encoded><![CDATA[<p>I&#8217;ll give that a go and see how I get on</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ShibaShake</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1533</link>
		<dc:creator>ShibaShake</dc:creator>
		<pubDate>Thu, 20 May 2010 22:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1533</guid>
		<description>One way to do this would be to create an array of taxonomy_id -&gt; count, and then just run PHP asort on the array. Then you can loop through the elements in the sorted array to display them in your drop down box.</description>
		<content:encoded><![CDATA[<p>One way to do this would be to create an array of taxonomy_id -&gt; count, and then just run PHP asort on the array. Then you can loop through the elements in the sorted array to display them in your drop down box.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1532</link>
		<dc:creator>Charlie</dc:creator>
		<pubDate>Thu, 20 May 2010 21:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1532</guid>
		<description>How would you add numbers to a drop down box so that they are sorted correctly and not as strings? eg 1,2,10,11,20 rather than 1,10,11,2,20</description>
		<content:encoded><![CDATA[<p>How would you add numbers to a drop down box so that they are sorted correctly and not as strings? eg 1,2,10,11,20 rather than 1,10,11,2,20</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ShibaShake</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1047</link>
		<dc:creator>ShibaShake</dc:creator>
		<pubDate>Tue, 09 Feb 2010 09:35:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1047</guid>
		<description>Thanks for uncovering this bug.

The reason why count is incremented twice is because a taxonomy relationship gets saved for the post and another gets saved for the post revision.

To fix this count problem, do a post_type check in your save_taxonomy_data function, e.g.
&lt;pre lang=&quot;PHP&quot;&gt;
	$post = get_post($post_id);
	if (($post-&gt;post_type == &#039;post&#039;) &#124;&#124; ($post-&gt;post_type == &#039;page&#039;)) { // OR $post-&gt;post_type != &#039;revision&#039;
  		$theme = $_POST[&#039;post_theme&#039;];
		wp_set_object_terms( $post_id, $theme, &#039;theme&#039; );
 	}
&lt;/pre&gt;

I will update the article tomorrow. Now I am off to bed.</description>
		<content:encoded><![CDATA[<p>Thanks for uncovering this bug.</p>
<p>The reason why count is incremented twice is because a taxonomy relationship gets saved for the post and another gets saved for the post revision.</p>
<p>To fix this count problem, do a post_type check in your save_taxonomy_data function, e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'post'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'page'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// OR $post-&gt;post_type != 'revision'</span>
  		<span style="color: #000088;">$theme</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_theme'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		wp_set_object_terms<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$theme</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'theme'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I will update the article tomorrow. Now I am off to bed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angelia</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1046</link>
		<dc:creator>Angelia</dc:creator>
		<pubDate>Tue, 09 Feb 2010 05:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1046</guid>
		<description>Me again. Okay, so, I thought I was in the clear with that solution, but, alas, no bueno again. Turns out that using the code for the custom dropdowns is doing something wonky with the post counts in the taxonomy. When I clear out all taxonomy terms etc., fire up this code in functions file and go to admin, all looks good, 0 posts for term, but, when I add a term to a post, save and then go to the taxonomy menu, it says that there are 2 posts under that term when there is only one. When I then delete the term, it says there is 1, when there is now 0. If I remove the custom styling/saving from functions file and repeat process using default meta box, the count is correct, 0,1,0. Any clues on this one?</description>
		<content:encoded><![CDATA[<p>Me again. Okay, so, I thought I was in the clear with that solution, but, alas, no bueno again. Turns out that using the code for the custom dropdowns is doing something wonky with the post counts in the taxonomy. When I clear out all taxonomy terms etc., fire up this code in functions file and go to admin, all looks good, 0 posts for term, but, when I add a term to a post, save and then go to the taxonomy menu, it says that there are 2 posts under that term when there is only one. When I then delete the term, it says there is 1, when there is now 0. If I remove the custom styling/saving from functions file and repeat process using default meta box, the count is correct, 0,1,0. Any clues on this one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angelia</title>
		<link>http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels/comment-page-1#comment-1045</link>
		<dc:creator>Angelia</dc:creator>
		<pubDate>Tue, 09 Feb 2010 02:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?page_id=424#comment-1045</guid>
		<description>Thanks so much for the help Shibashake! I&#039;ve just about been driving myself batty with all of this ;-) I have a client site that I&#039;m building currently, and the main thing that they provide is lesson plans for teachers. My goal is to construct a backend admin that makes it easy for teachers to create the plans in the post editor ( taxonomy non-hierarchical modules ( dropdown ) for grade level, subject etc., custom taxonomy heirarchical for a gigantic ( dropdown ) listing of applicable state standards ), custom taxonomy default selection for general things like materials and the default post tags for other searchable descriptions ... you get the point. Of course, then I have to have all of those same modules provide for in-depth searchability of the plans for the front end user. The new taxonomy, custom post types, and admin hooks are absolutely perfect for implementing all of this, but, my goodness, not only is there very little info out there at the moment, I&#039;ve been watching the trac to see how things are coming along, and just about everything that I need to custom code to make this happen, is going to be implemented in 3.0. I&#039;m pulling my hair out to work out how I should implement this stuff now, without having to redo everything in a month from now. I&#039;ve scoured the available plugins ( simple taxonomies, custom taxonomies and gdtaxonomy tools ) in an attempt to put something custom together for my client to be able to use now, but, they all fall short in one way or another. Custom Taxonomies creates its own table, and I experienced some duplicate counts with it, not to mention there is a bug with not being able to deselect a selected term in the custom checkbox metabox. Simple taxonomies is really really simple, providing a nice start, but, doesn&#039;t take into account hierarchical, or custom post type. I tried implementing them in there myself, but, no bueno. GD tools is mostly fluff, and the one feature that I was interested ( deletion ) doesn&#039;t work. I checked the database twice, and the terms were still there. I&#039;ve never written my own plugin from scratch, I mostly just do customizations of existing code ( self-taught ... what can I say ), so I&#039;m not really confident yet in my ability to put a beast like that together properly myself, especially after looking through the trac at all of the customizations that are having to be made on so many levels of core files just to implement these big changes.
It seems that in the trac, they are extending Walker to deal with dropdowns for hierarchical terms.
I&#039;m rambling. My conclusion is to 1. remove any plugin attempts ( my custom ones or otherwise ) for now, 2. stick to the basics ( with your style inclusions ) 3. keep it all in the functions file and 4. hold off on implementing the hierarchical taxonomies until the 3.0 release. Then I&#039;ll just hold my breath that along with the 3.0 release comes a taxonomy column in edit.php, singular and plural terms, easy styling of meta boxes, and the ability to transition what I&#039;m doing in my functions file, to the core without screwing anything up in the database, ie unregister_taxonomy. Ha! Wish me luck. Should be fun explaining all of this to my client ... always is.</description>
		<content:encoded><![CDATA[<p>Thanks so much for the help Shibashake! I&#8217;ve just about been driving myself batty with all of this <img src='http://shibashake.com/wordpress-theme/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  I have a client site that I&#8217;m building currently, and the main thing that they provide is lesson plans for teachers. My goal is to construct a backend admin that makes it easy for teachers to create the plans in the post editor ( taxonomy non-hierarchical modules ( dropdown ) for grade level, subject etc., custom taxonomy heirarchical for a gigantic ( dropdown ) listing of applicable state standards ), custom taxonomy default selection for general things like materials and the default post tags for other searchable descriptions &#8230; you get the point. Of course, then I have to have all of those same modules provide for in-depth searchability of the plans for the front end user. The new taxonomy, custom post types, and admin hooks are absolutely perfect for implementing all of this, but, my goodness, not only is there very little info out there at the moment, I&#8217;ve been watching the trac to see how things are coming along, and just about everything that I need to custom code to make this happen, is going to be implemented in 3.0. I&#8217;m pulling my hair out to work out how I should implement this stuff now, without having to redo everything in a month from now. I&#8217;ve scoured the available plugins ( simple taxonomies, custom taxonomies and gdtaxonomy tools ) in an attempt to put something custom together for my client to be able to use now, but, they all fall short in one way or another. Custom Taxonomies creates its own table, and I experienced some duplicate counts with it, not to mention there is a bug with not being able to deselect a selected term in the custom checkbox metabox. Simple taxonomies is really really simple, providing a nice start, but, doesn&#8217;t take into account hierarchical, or custom post type. I tried implementing them in there myself, but, no bueno. GD tools is mostly fluff, and the one feature that I was interested ( deletion ) doesn&#8217;t work. I checked the database twice, and the terms were still there. I&#8217;ve never written my own plugin from scratch, I mostly just do customizations of existing code ( self-taught &#8230; what can I say ), so I&#8217;m not really confident yet in my ability to put a beast like that together properly myself, especially after looking through the trac at all of the customizations that are having to be made on so many levels of core files just to implement these big changes.<br />
It seems that in the trac, they are extending Walker to deal with dropdowns for hierarchical terms.<br />
I&#8217;m rambling. My conclusion is to 1. remove any plugin attempts ( my custom ones or otherwise ) for now, 2. stick to the basics ( with your style inclusions ) 3. keep it all in the functions file and 4. hold off on implementing the hierarchical taxonomies until the 3.0 release. Then I&#8217;ll just hold my breath that along with the 3.0 release comes a taxonomy column in edit.php, singular and plural terms, easy styling of meta boxes, and the ability to transition what I&#8217;m doing in my functions file, to the core without screwing anything up in the database, ie unregister_taxonomy. Ha! Wish me luck. Should be fun explaining all of this to my client &#8230; always is.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 1.258 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-29 22:12:32 -->
