You are here

wordpress_categories.yml in WordPress Migrate 8.3

migrations/wordpress_categories.yml

File

migrations/wordpress_categories.yml
View source
  1. id: wordpress_categories
  2. label: Import categories from WordPress XML
  3. migration_tags:
  4. - WordPress
  5. source:
  6. plugin: url
  7. data_fetcher_plugin: http
  8. data_parser_plugin: xml
  9. item_selector: /rss/channel/wp:category
  10. fields:
  11. -
  12. name: term_id
  13. label: WordPress term ID
  14. selector: wp:term_id
  15. -
  16. name: category_nicename
  17. label: Analogous to machine name
  18. selector: wp:category_nicename
  19. -
  20. name: category_parent
  21. label: 'category_nicename of the parent term'
  22. selector: wp:category_parent
  23. -
  24. name: cat_name
  25. label: 'Human name of term'
  26. selector: wp:cat_name
  27. ids:
  28. category_nicename:
  29. type: string
  30. process:
  31. # vid is populated dynamically.
  32. name: cat_name
  33. parent:
  34. plugin: migration_lookup
  35. migration: wordpress_categories
  36. source: category_parent
  37. destination:
  38. plugin: entity:taxonomy_term
  39. migration_dependencies: {}