WordPress.org

Support

Support » How-To and Troubleshooting » Copying batches of posts and changing the post type as the same time

Copying batches of posts and changing the post type as the same time

  • Hi,

    I have a bunch of posts (regular posts) in a site. I also have a custom post type defined in the same site. I’d like to be able to COPY all the posts and also change their post_type to the custom post type. In effect, i know I would have 2 copies of the post at that point.

    Simple conversion from one post type to another is easy. But, this is different.

    I’ve tried a few things. The most fruitful was:

    1) export all of the content
    2) edit the export file and find/replace:

    find:<wp:post_type>post</wp:post_type>

    replace with: <wp:post_type>posttype</wp:post_type>

    3) import

    This seems to work, except for the images. Since the images already exist in the site, they are not re-imported (good), but there are also no images attached to the new custom post type posts.

    Any ideas? thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ok I understand your problem, and I’m looking for a solution, but…
    Are you really sure you want to do this? Duplicated content is a beast for Google, don’t you care about that?

    Thanks. yes, I know that duplicate content is bad. The old posts will eventually go away, leaving just the custom posts.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Copying batches of posts and changing the post type as the same time’ is closed to new replies.
Skip to toolbar