import - Importing old blog with regular posts into new custom post types

I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older insta

I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older installs is for "news" posts and the other is for "blog" posts (I know this was not the best way of setting things up).

In my new blog, I have created two custom post types ("news" and "blog") and I would like to import these two older installs into my new install's respective post types.

Is there an automated way of doing this (perhaps a plugin) that would save me from manually re-entering all of these posts? I'm assuming that simply importing these will not allow me to mark them as a custom post type and instead would make them generic posts.

Thank you! Jake

I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older installs is for "news" posts and the other is for "blog" posts (I know this was not the best way of setting things up).

In my new blog, I have created two custom post types ("news" and "blog") and I would like to import these two older installs into my new install's respective post types.

Is there an automated way of doing this (perhaps a plugin) that would save me from manually re-entering all of these posts? I'm assuming that simply importing these will not allow me to mark them as a custom post type and instead would make them generic posts.

Thank you! Jake

Share Improve this question asked Mar 24, 2011 at 15:03 RedlistRedlist 1571 gold badge5 silver badges10 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 2

Try importing and then using a plugin (Post Type Switcher) to change the type. There are a few other plugins out there for this, I seem to remember one which would convert multiple posts, but I couldn't find it just now.

As an alternative, when you use the Wordpress Export tool, you can open the XML file that is exported in any text editor (I used Notepad++).

I did a simple find a replace on this line:

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

and replaced with:

<wp:post_type>blog</wp:post_type>

This took all my old "posts" and made them into my new custom content type "blog".

Then I just imported into the new site, that already had a custom post type called "blog" and it worked flawlessly.

Update to @gamerzfuse's answers,

After opening XML in editor, replace below lines/keywords.

Find the below line

<wp:post_type><![CDATA[post]]></wp:post_type>

and replac with:

<wp:post_type><![CDATA[CustomPostType]]></wp:post_type>

To add category, find

domain="category"

and replace with

domain="CustomPostTypeCategorySlug"

To add tags, find

post_tag

and replace with

CustomPostTypeTagSlug

This will also import Categories and Tags associated with the post into Custom Post Type.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745542401a4632186.html

相关推荐

  • import - Importing old blog with regular posts into new custom post types

    I have 2 older WP blog installs with regular posts that I would like to bring over to a new blog. One of the older insta

    1天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信