Probably this is my first message in this list, so hello to you all!
Well, I'm working in a project for a Non-Governamental Organization, and like most of the NGOs around the world, they have a lot of texts, articles, cases and campaings, wich will result in a big process of categorization. My ideia is to add more category boxes (as you can see here http://wordpress.org/support/topic/233789?replies=2) in the Add / Edit Post panels to help me - and them, specially - organise all the content, separating each one of my main categories in different boxes / tags. I've managed to hack edit-form-advanced.php for testing, but I don't want do do that.
So, my questions: is there a good way to manage this without hacking into edit-form-advanced.php? Yes, I'm planning a plugin, but God, my head's a mess theses days and I can't think clearly anymore. Should I remove post_categories_meta_box and create my own with add_meta_box? Corrections, suggestions and enlightenments will be much appreciated.
<edua...@ethymos.com.br> wrote: > Probably this is my first message in this list, so hello to you all!
> Well, I'm working in a project for a Non-Governamental Organization, and > like most of the NGOs around the world, they have a lot of texts, articles, > cases and campaings, wich will result in a big process of categorization. My > ideia is to add more category boxes (as you can see here > http://wordpress.org/support/topic/233789?replies=2) in the Add / Edit Post > panels to help me - and them, specially - organise all the content, > separating each one of my main categories in different boxes / tags. I've > managed to hack edit-form-advanced.php for testing, but I don't want do do > that.
> So, my questions: is there a good way to manage this without hacking into > edit-form-advanced.php? Yes, I'm planning a plugin, but God, my head's a > mess theses days and I can't think clearly anymore. Should I remove > post_categories_meta_box and create my own with add_meta_box? Corrections, > suggestions and enlightenments will be much appreciated.
WP 2.8 (not yet released) will show boxes for all defined tag taxonomies. If you use register_taxonomy() to define new non-hierarchical taxonomies, they will show on the edit screen. Unfortunately, this is not yet done for hierarchical taxonomies like post categories. If you want to show multiple hierarchical taxonomies on the edit screen you have to add the UI yourself. I think there are some plugins that do this. Maybe this one: http://wordpress.org/extend/plugins/custom-taxonomies/ _______________________________________________ wp-hackers mailing list wp-hack...@lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
Unless I misunderstood, I don't think he's trying to define his own taxonomies. I think he has a large hierarchy within the standard Post Categories taxonomy, and he wants to display each top-level category in its own box on the post edit screen, and also hide the existing category/tag boxes.
If that is correct, then yes you should create your own with add_meta_box() in a plugin. Any recent plugin that adds things to the post edit screen should have some examples, or if all else fails, read the documentation and try to do something similar:
You will want to make sure that when someone selects categories in your box, it corresponds to the same POST variables getting submitted as when they use the existing Categories edit section.
Removing the existing tags/categories boxes is easy -- you don't need a plugin. Just click on "Screen Options" when you are on the Post Edit screen, and un-check the Tags and Categories boxes.
Ryan Boren wrote: > On Tue, Apr 28, 2009 at 2:36 PM, Eduardo Wosiack Zulian > <edua...@ethymos.com.br> wrote: >> Probably this is my first message in this list, so hello to you all!
>> Well, I'm working in a project for a Non-Governamental Organization, and >> like most of the NGOs around the world, they have a lot of texts, articles, >> cases and campaings, wich will result in a big process of categorization. My >> ideia is to add more category boxes (as you can see here >> http://wordpress.org/support/topic/233789?replies=2) in the Add / Edit Post >> panels to help me - and them, specially - organise all the content, >> separating each one of my main categories in different boxes / tags. I've >> managed to hack edit-form-advanced.php for testing, but I don't want do do >> that.
>> So, my questions: is there a good way to manage this without hacking into >> edit-form-advanced.php? Yes, I'm planning a plugin, but God, my head's a >> mess theses days and I can't think clearly anymore. Should I remove >> post_categories_meta_box and create my own with add_meta_box? Corrections, >> suggestions and enlightenments will be much appreciated.
> WP 2.8 (not yet released) will show boxes for all defined tag > taxonomies. If you use register_taxonomy() to define new > non-hierarchical taxonomies, they will show on the edit screen. > Unfortunately, this is not yet done for hierarchical taxonomies like > post categories. If you want to show multiple hierarchical taxonomies > on the edit screen you have to add the UI yourself. I think there are > some plugins that do this. Maybe this one: > http://wordpress.org/extend/plugins/custom-taxonomies/
-- Jennifer Hodgdon * Poplar ProductivityWare www.poplarware.com Drupal, WordPress, and custom Web programming
Almost there, Jennifer. Put each top-level category in its own box is an idea. However, I was planning to maybe, if possible, to put these categories into the post_categories_meta_box, side by side with the "most used" tab. Is that possible, right?
2009/4/28 Jennifer Hodgdon <yah...@poplarware.com>
> Unless I misunderstood, I don't think he's trying to define his own > taxonomies. I think he has a large hierarchy within the standard Post > Categories taxonomy, and he wants to display each top-level category in its > own box on the post edit screen, and also hide the existing category/tag > boxes.
> If that is correct, then yes you should create your own with add_meta_box() > in a plugin. Any recent plugin that adds things to the post edit screen > should have some examples, or if all else fails, read the documentation and > try to do something similar:
> You will want to make sure that when someone selects categories in your > box, it corresponds to the same POST variables getting submitted as when > they use the existing Categories edit section.
> Removing the existing tags/categories boxes is easy -- you don't need a > plugin. Just click on "Screen Options" when you are on the Post Edit screen, > and un-check the Tags and Categories boxes.
> Good luck!
> --Jennifer
> Ryan Boren wrote:
>> On Tue, Apr 28, 2009 at 2:36 PM, Eduardo Wosiack Zulian >> <edua...@ethymos.com.br> wrote:
>>> Probably this is my first message in this list, so hello to you all!
>>> Well, I'm working in a project for a Non-Governamental Organization, and >>> like most of the NGOs around the world, they have a lot of texts, >>> articles, >>> cases and campaings, wich will result in a big process of categorization. >>> My >>> ideia is to add more category boxes (as you can see here >>> http://wordpress.org/support/topic/233789?replies=2) in the Add / Edit >>> Post >>> panels to help me - and them, specially - organise all the content, >>> separating each one of my main categories in different boxes / tags. I've >>> managed to hack edit-form-advanced.php for testing, but I don't want do >>> do >>> that.
>>> So, my questions: is there a good way to manage this without hacking into >>> edit-form-advanced.php? Yes, I'm planning a plugin, but God, my head's a >>> mess theses days and I can't think clearly anymore. Should I remove >>> post_categories_meta_box and create my own with add_meta_box? >>> Corrections, >>> suggestions and enlightenments will be much appreciated.
>> WP 2.8 (not yet released) will show boxes for all defined tag >> taxonomies. If you use register_taxonomy() to define new >> non-hierarchical taxonomies, they will show on the edit screen. >> Unfortunately, this is not yet done for hierarchical taxonomies like >> post categories. If you want to show multiple hierarchical taxonomies >> on the edit screen you have to add the UI yourself. I think there are >> some plugins that do this. Maybe this one: >> http://wordpress.org/extend/plugins/custom-taxonomies/
> -- > Jennifer Hodgdon * Poplar ProductivityWare > www.poplarware.com > Drupal, WordPress, and custom Web programming
Ah, that's quite different. The meta_box() function lets you add separate boxes to the edit screen. If you want to modify a built-in box, the code that creates that built-in box would need to have an "action" hook call in it that would let plugins add to the box (assuming you don't want to hack core).
It doesn't appear to me that the post_categories_meta_box() function in wp-admin/edit-form-advanced.php has such a hook right now, but if you file a bug on trac.wordpress.org with a patch that adds an action hook call, you can probably get it added to 2.8 (the WP Powers that Be are usually pretty receptive to these additions). Meanwhile, you can hack core by adding just that one line to the file, which isn't quite as bad as totally rewriting the function.
Good luck! --Jennifer
ps: I don't know how familiar you are with WP "action" hooks... the line you would want to add to core WP is something like this:
do_action( 'post_categories_meta_box' );
And your plugin would have:
add_action( 'post_categories_meta_box', 'myplugin_myfunctionname' ); function myplugin_myfunctionname() { //print out your addition to the box
}
Anyway, you could try this out, and if it works, file a Trac bug to get the do_action line added to core.
Eduardo Wosiack Zulian wrote: > Almost there, Jennifer. Put each top-level category in its own box is an > idea. However, I was planning to maybe, if possible, to put these categories > into the post_categories_meta_box, side by side with the "most used" tab. Is > that possible, right?
-- Jennifer Hodgdon * Poplar ProductivityWare www.poplarware.com Drupal, WordPress, and custom Web programming
> Ah, that's quite different. The meta_box() function lets you add separate > boxes to the edit screen. If you want to modify a built-in box, the code > that creates that built-in box would need to have an "action" hook call in > it that would let plugins add to the box (assuming you don't want to hack > core).
> It doesn't appear to me that the post_categories_meta_box() function in > wp-admin/edit-form-advanced.php has such a hook right now, but if you file a > bug on trac.wordpress.org with a patch that adds an action hook call, you > can probably get it added to 2.8 (the WP Powers that Be are usually pretty > receptive to these additions). Meanwhile, you can hack core by adding just > that one line to the file, which isn't quite as bad as totally rewriting the > function.
> Good luck! > --Jennifer
> ps: I don't know how familiar you are with WP "action" hooks... the line > you would want to add to core WP is something like this:
> do_action( 'post_categories_meta_box' );
> And your plugin would have:
> add_action( 'post_categories_meta_box', 'myplugin_myfunctionname' ); > function myplugin_myfunctionname() { > //print out your addition to the box > }
> Anyway, you could try this out, and if it works, file a Trac bug to get the > do_action line added to core.
> Eduardo Wosiack Zulian wrote:
>> Almost there, Jennifer. Put each top-level category in its own box is an >> idea. However, I was planning to maybe, if possible, to put these >> categories >> into the post_categories_meta_box, side by side with the "most used" tab. >> Is >> that possible, right?
> -- > Jennifer Hodgdon * Poplar ProductivityWare > www.poplarware.com > Drupal, WordPress, and custom Web programming