[wp-hackers] Time for a wp_post_relationships table?

Otto otto at ottodestruct.com
Wed Aug 4 13:49:26 UTC 2010


BTW, to manually set the slug on a term to something, use
wp_insert_term and 'slug'=>'whatever' in the args array. If you let it
get auto-created from just the name, then you can't guarantee what the
slug is.

-Otto



On Wed, Aug 4, 2010 at 8:45 AM, Otto <otto at ottodestruct.com> wrote:
> On Tue, Aug 3, 2010 at 8:43 PM, Michael Pretty <mpretty at voceconnect.com> wrote:
>> -You can have more than one post with the same title, but you can only have
>> 1 term of a single title...clients will create multiple of the same object,
>> don't ask why.
>
> You shouldn't be using the title as your term, specifically because
> it's not unique.
>
> Basically, this is an already solved problem. The post_name is unique,
> and if you're "mirroring", then that should be your new "slug" in the
> terms table. The term_name can be anything, and you can make it the
> title if you like, but the slug is what has to be unique.
>
>> -If you renamed a post, you may not always successfully be able to rename
>> the term if there is a conflict.
>> -Because of the way term names span multitple taxonomies, you may not always
>>  be able to have the name be exactly as the client wants due to conflicts.
>
> No, multiple terms can have the same names. The unique key is on the
> slug. You can always change the name of the term to anything you
> please.
>
> -Otto
>


More information about the wp-hackers mailing list