To set the parent for the term with ID 12, you can modify the 'parent' parameter in the wp_insert_term() function like this:

$term_id = wp_insert_term(
    $cname,   
    'qqcpat',
    array(
        'description' => $cdescription,
        'slug'        => $cnamel,
        'parent'      => 12,
    )
);

Replace 12 with the actual ID of the parent term you want to set.

$term_id = wp_insert_term $cname qqcpat array description = $cdescription slug = $cnamel parent = ;i want to set parent with id 12 for it

原文地址: https://www.cveoy.top/t/topic/iBdM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录