Adding categories/tags
This commit is contained in:
parent
5f564bdbff
commit
39914c83c9
|
@ -12,7 +12,6 @@ the popular WP blog url structure "YYYY-MM/slug", be warned that Refinery just u
|
||||||
So your inner site links will point to the old WP url.
|
So your inner site links will point to the old WP url.
|
||||||
|
|
||||||
== TODO
|
== TODO
|
||||||
- categories
|
|
||||||
- tags
|
- tags
|
||||||
- attachments
|
- attachments
|
||||||
- what about wordpress suffixes like -300x290 ?
|
- what about wordpress suffixes like -300x290 ?
|
||||||
|
|
|
@ -54,6 +54,12 @@ module WordPressImport
|
||||||
translation.locale = "en"
|
translation.locale = "en"
|
||||||
translation.title = title
|
translation.title = title
|
||||||
translation.body = content_formatted
|
translation.body = content_formatted
|
||||||
|
|
||||||
|
# merge the translation's category list with the wordpress post's
|
||||||
|
translation.category_list |= categories.collect(&:name)
|
||||||
|
# and tags
|
||||||
|
translation.category_list |= tags.collect(&:name)
|
||||||
|
|
||||||
translation.save
|
translation.save
|
||||||
|
|
||||||
post.save
|
post.save
|
||||||
|
|
Loading…
Reference in New Issue
Block a user