admin管理员组文章数量:1392047
I am updating a very old WP-based website that was created prior to WP use of "featured images" aka thumbnails and the name of all post images are contained in a custom meta-field called "Image" (rather than embedded in the body of the post). The old Theme then called the path plus the meta-field to display the image.
However with the new Theme I'd like to move all of those images from the old custom field to the "featured image" instead so that the NEW Theme doesn't have to treat old and new content differently or test for the presence of a name in that meta-field before deciding how to display the post image.
Is there a MySQL query that will find all of the meta-data with a key of "Image" and then copy that data (value) to a new record for each Post ID where featured images are stored in the wp_postmeta table as _wp_attached_file?
OR would that not be advisable given that all other attachment data (_wp_attachment_metadata and _wp_attachment_alt) would be missing? All that is stored now is the image file name.
I'm not good with SQL queries so any help and advice would be much appreciated!
本文标签: Update old Post image metadata to 39thumbnail39 wpattachedfile
版权声明:本文标题:Update old Post image metadata to 'thumbnail' wp_attached_file 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744782570a2624800.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论