[wp-hackers] Issue with inserting terms in a register_activation_hook

scribu scribu at gmail.com
Mon Sep 6 15:17:15 UTC 2010


On Mon, Sep 6, 2010 at 4:47 PM, Philip M. Hofer (Frumph)
<philip at frumph.net>wrote:

> Now this is what i'm assuming, that, that particular portion of code is
> just unable to be executed from an activation_hook.   When I move the code
> out to a separate block that is executed in a different location not in the
> activation hook, it .. sort of works, the first wp_insert_term works, but
> creating a child off the parent does not, it creates the 2nd term but
> doesn't make the first term created it's parent (even though the database
> reports the term_id of the parent, correctly)... I'm obviously missing how
> to associate the relationship probably.
>

Make sure the taxonomy you are trying to insert terms into is registered at
that point.

-- 
http://scribu.net


More information about the wp-hackers mailing list