The custom post type custom field value added with wordpress is not in the exported xml.
Export and import are the default ones, and no plug-ins are included for them.
Thanks for your professor.

  • Answer # 1

    As long as you see export_wp, it should be exported unless you try to remove it from the export target

    get_results ($wpdb->prepare ("SELECT * FROM $wpdb->postmeta WHERE post_id =% d", $post->ID));
                    foreach ($postmeta as $meta):
                        / **
                         * Filters whether to selectively skip post meta used for WXR exports.
                         * Returning a truthy value to the filter will skip the current meta
                         * object from being exported.
                         * @since 3.3.0
                         * @param bool $skip Whether to skip the current post meta.
                         * @param string $meta_key Current meta key.
                         * @param object $meta Current meta object.
                         * /
                        if (apply_filters ('wxr_export_skip_postmeta', false, $meta->meta_key, $meta)) {

    If there is a process that skips writing custom fields
    If you add a filter like below, you should be able to deal with it.

    add_filter ('wxr_export_skip_postmeta', '__ return_false', 999);

    If this doesn't work, you can use a custom field plug-in in the first place
    There is also the possibility of not storing values ​​in the post_meta table
    Check if the value is in the post_meta table

  • Answer # 2

    How about using the following?

    WP CSV Exporter

    It will be CSV, not XML

Related articles