[wp-hackers] hierarchical custom taxonomies vs good & old cats.
Haluk Karamete
halukkaramete at gmail.com
Thu Dec 16 20:50:52 UTC 2010
No Nacin, That wasn't what I was referring to. sorry it wasn't
clear... here is the attemp2...
Tags ( the built-in tag's I'm taking about ) is open ended. If I
create a tag called say "apple", there is no context. Is it the
computer apple? Is it the fruit apple? But If were to create
taxonomies "fruits" and "computers", I would have had the choice of
inserting the word "apple" under the fruits taxonomy without mixing
and matching, well, apples and oranges. ( what a confusing expression
to refer to. )
So, when I create a tag cloud for the fruits taxonomy, clicking on the
word "apple" under the fruits cloud , that click woud never pull the
Apple inc. stuff. but, that's old business, the non-hier taxonomies
already allow you to do this.
So where is the problem?
The problem is, that i lose all that power if I were choose to
configure the fruits taxonomy to be as hierarchical.
Because with a hierarchical taxonomy, I no longer add the word
"apple", the same way I did with the non-hierarchical case. At this
point, my two options are either to add the "apple" into the tags
taxonomy as a good & old tag, or create an "apple" term and make its
parent id Fruits. But then at this point, the system starts behaving
exactly like the good & old cats.
if I were to create 2 groupings under the fruits taxonomy for
example as "multi-color fruits", and I wanted to add the comma
separated list "apple, grape, berry" under the "multi-color fruits" in
one go. I cannot. That's the problem.
In this example, the apple, grape stuff is screaming to be added as
tag items. But, they end up getting into as children of "multi-color
fruits", one at a time where at each time you need the point the
parent ID, exactly like the way cats work, not the way tags work.
sorry for the long expression but there yo have it.
I don't know if I was able to make the point clearer now?
The ideal ( and the most natural ) solution would be one that gives me
the power to do this;
step 1
create fruits taxonomy, make it hierarchical.
step 2
create a term called "multi-color fruits" under the fruits taxonomy.
step 3
when you are adding a post and you want to tag it as apple, and also
as berry ( just because the post is talking about a recipe which only
uses apple and berries), you put a checkbox on the "multi-color
fruits" and then add the apple and berry in a comma separated way in
one go as apple,berry into another text box in the WP UI ( which is
currently not available).
the benefits of having something like this is this; it only extends
the power of custom taxonomies by giving them the tag grouping power
to its any level groupings.
so that when my visitors are on that recipe page,
they would be seeing something like this
Fruits: multi-color fruits, apple, grape
where clicking on "multi-color fruits" will bring the posts that has
been assigned to "multi-color fruits" which may bring posts that's
been tagged not only by apple and grape but also berries.
and where clicking on "apple" will bring only those posts that has
been tagged with apple, while excluding the Apple Inc. related posts
that have also been tagged as "apple".
On Wed, Dec 15, 2010 at 11:22 PM, Andrew Nacin <wp at andrewnacin.com> wrote:
> On Thu, Dec 16, 2010 at 2:09 AM, Haluk Karamete <halukkaramete at gmail.com>wrote:
>
>> My understanding is that if I choose to create a hierarchical custom
>> taxonomy say "People", I will not be able to use tags that are under
>> its context.
>>
>> Example case
>>
>> people ( this is a custom taxonomy )
>>
>> ---politicians ( this is a sub level under the people cus. taxonomy )
>>
>> And I want to add "obama" as a tag/term under the taxonomy above, i'm
>> out of luck. because with hierarchical cust. taxes, all I'm left with
>> is either to use post-tags or to create another sub level under
>> "politicians" as obama. both options no good. I wonder why I cannot
>> have a tag option under hierarchical taxonomies. there gotto be a
>> technical limitation on that as far as WP mechanics.
>>
>> but if I choose people to be non-hierarchical, that I would be able to
>> tag items such as obama, mccain, etc easily.
>>
>> In this case, ( I mean in the non-hierarchical case), I see great
>> value and organizational power. And this power is just not there out
>> of the box by simply using categories and tags. But the moment, you
>> choose to make your custom taxonomy a hierarchical one, you lose a
>> lot; your cus. tax. now acts exactly like a top level cat.
>>
>> In other words, whether you create this structure as a top level
>> category titled "people" or as a hierarchical custom taxonomy titled
>> "people", it makes no difference as far as practical results.
>>
>> people
>>
>> ----politicians
>>
>> ----celebrities
>>
>> ----athletes
>>
>>
>> Am I right?
>
>
> I think you're referring to the URLs, right?
>
> You want:
> example.com/people/politicians/obama/
>
> But you're getting:
> example.com/obama/
>
> If I'm correct, then you're in luck, WordPress 3.1 (currently in late beta)
> contains support for hierarchical URLs for hierarchical taxonomies.
>
> When registering your taxonomy, you'll pass an array to the 'rewrite' flag,
> with 'hierarchical' => true.
>
> More here:
> http://core.trac.wordpress.org/ticket/12659
>
> Nacin
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list