admin管理员组文章数量:1134571
I am attempting to import a site using XML generated by WordPress
All the posts and media seem to import, but the comments fail with errors
Failed to import “Sarah Toon - 2015-10-10 08:29:30”: Invalid post type feedback
Failed to import “Kylie - 2015-10-10 08:34:50”: Invalid post type feedback
Failed to import “Sophie Ward - 2015-10-10 08:36:22”: Invalid post type feedback
Reading other posts, here on WordPress.SE none of them have an accepted answer. The closest I could find is Custom post types not imported properly but that is about posts, not comments.
Can someone get me started on solving this please?
I am attempting to import a site using XML generated by WordPress.com
All the posts and media seem to import, but the comments fail with errors
Failed to import “Sarah Toon - 2015-10-10 08:29:30”: Invalid post type feedback
Failed to import “Kylie - 2015-10-10 08:34:50”: Invalid post type feedback
Failed to import “Sophie Ward - 2015-10-10 08:36:22”: Invalid post type feedback
Reading other posts, here on WordPress.SE none of them have an accepted answer. The closest I could find is Custom post types not imported properly but that is about posts, not comments.
Can someone get me started on solving this please?
Share Improve this question edited Jul 5, 2022 at 23:42 Steve asked Jan 11, 2017 at 10:55 SteveSteve 2971 gold badge4 silver badges15 bronze badges 3 |3 Answers
Reset to default 6The issue is you're trying to import posts with a post type of feedback
, but there is no such post type registered on your install of WordPress.
Quick-and-easy fix is to register one:
add_action( 'init', function () {
register_post_type( 'feedback', [
'public' => true,
'labels' => [
'singular_name' => 'Feedback',
'name' => 'Feedback',
]
]);
});
Place it in your theme's functions.php
, or in a MU plugin (eg. wp-content/mu-plugins/feedback.php
).
The Jetpack plugin creates a custom post type of feedback when active. You may need to just install that plugin first (as I did). Cheers!
I was migrating a website from wordpress.com and I had same problem.
I've solved first installing the Jetpack plugin, then activating the Contact Form module in this url [yoursite.com]/wp-admin/admin.php?page=jetpack_modules and finally doing the import.
Hope that helps to someone!
本文标签: commentsWhen importingfailed to import Invalid post typefeedback
版权声明:本文标题:comments - When importing - failed to import: Invalid post type, feedback 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736833547a1954803.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
WordPress.com
? – prosti Commented Jan 11, 2017 at 11:06