• Resolved christopherross

    (@christopherross)


    I have an annoying problem where a couple tags reinsert themselves in my database and I’m looking for a way through PHP to auto merge them.

    What I have is a $term_id for the first and a $second_id for the second, is there an easy way to make all of $second_id merge into $term_id?

Viewing 1 replies (of 1 total)
  • Thread Starter christopherross

    (@christopherross)

    Scribu was nice enough to help me with this offline, the solution is:

    wp_delete_term( $term_id, 'post_tag', array( 'default' => $second_id, 'force_default' => true ) );

Viewing 1 replies (of 1 total)
  • The topic ‘Trying to merge a couple tags in PHP’ is closed to new replies.