Skip to content

Missing the featured image remapping process after import #53

@GonZOO82

Description

@GonZOO82

I tried the CLI tool, and I import the big XML file.
Importing is fast and cool, but I have a big problem.
When I import the post with attachment (featured image) then is not paired to the post.
I don't add the post_id to the post, but I use incrementing ID at attachment and that I add to the meta_value to the post item.

Sample XML:

<item>
    <title>Post content title</title>
    <wp:post_type>post</wp:post_type>
    <wp:postmeta>
        <wp:meta_key>_thumbnail_id</wp:meta_key>
        <wp:meta_value><![CDATA[1234]]></wp:meta_value>
    </wp:postmeta>
</item>

<item>
    <wp:post_id>1234</wp:post_id>
    <title>demo.jpg</title>
    <wp:post_type>attachment</wp:post_type>
</item>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions