admin管理员组文章数量:1430588
This question is with regard to feature images on WooCommerce product
post types, however it should probably apply to any post type.
I am running a custom script to create new posts (of type product
) and want to set the featured image to be an external URL, rather than importing the images to my server as the images are already served via CDNs.
A normal featured image sets _thumbnail_id
in the wp_postmeta
table, and the meta_value
column then references the image details on wp_posts
. Whilst I can probably manually create these database entries, I am wondering if there is a WordPress function to do this that I don't know about.
I'm looking for a programatic solution rather than any plugin suggestions.
本文标签: woocommerce offtopicSet Post Thumbnail to external URL
版权声明:本文标题:woocommerce offtopic - Set Post Thumbnail to external URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745509755a2661412.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论