post\\u缩略图信息是如何存储的?
如果您已经使用图像创建了附件,并且正在存储附件的postId 在里面post_thumbnail, 然后你只需要浏览你的帖子并使用update_post_meta($postId, \'_thubmnail_id\', $attachmentPostId).
如果post_thumbnail 在服务器上存储图像文件的路径,您需要使用wp_insert_attachment 并传入该文件位置。如果文件尚未存储在uploads目录中,则可以使用Add From Server plugin 将文件作为附件导入wordpress。然后您可以使用update_post_meta 将附件设置为您的特色图像。
如果post_thumbnail stories图像的URI,您需要save it to your server, 然后创建附件,然后更新帖子的元。