How to import taxonomy with term name and slug
-
How to work with custom taxonomies?
My term name and term slug do not import properly. The term meta imported successfully just not term name and slugs. See sample taxonomy. My custom taxonomy “mukims”. Can I get some help with this?
After imported (screenshot) – https://ibb.co/6W7Vc2d
In database (screenshot) – https://ibb.co/zVyN0PD
Sample data to import- https://ibb.co/stBzScwjust for tests below did not change term name and slug
<?php add_filter('wp_insert_term_data', 'hookwp', 10, 3); function hookwp ($data, $taxonomy, $args) { if ($taxonomy == 'mukims') { $data['name']="My term Name"; $data['slug'] = "my-term-slug"; } return $data; } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to import taxonomy with term name and slug’ is closed to new replies.