WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Bill Dennen
    Member
    Posted 2 years ago #

    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.

  2. YouON
    Member
    Posted 2 years ago #

    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?

  3. Bill Dennen
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.