Copy Tags from one post type to another post type

You didn’t post any code, including the name of custom post type that Ultimate Member is creating, but this is the general query for your request:

function copy_my_tags(){
    // Get every terms used by Ultimate Member
    $terms = get_terms( array(
            'taxonomy' => 'custom_tax',
            'hide_empty' => false,
        ) );
    // Run a loop and create tags based on custom terms
    foreach ($terms as $term) {
        // Check if the tag already exists
        if(!term_exists($term , 'post_tag')){
            wp_insert_term ( array(
                $term,
                'post_tag',
            );
        }
    }
}
add_action('init','copy_my_tags');

Add this code to your theme’s functions.php file, and load any page. Once you load WordPress, the tags will be copied. Then you should delete this code to prevent it from running each time a page is loaded.

Leave a Comment