Desarrollar software
已关闭
已发布的
7 年前
货到付款
$10-30 USD
货到付款
已关闭
货到付款
Hi, i need to create a funtion to add featured image also to gallery in a product using WP ALL IMPORT
From wp all import support gave me this:
add_action('pmxi_saved_post', 'update_gallery_ids', 10, 3);
function update_gallery_ids($id) {
$media = get_attached_media( 'image', $id );
foreach($media as $item){
$gallery_img = wp_get_attachment_url($item->ID);
add_post_meta( $id, 'wpcf-property-gallery', $gallery_img );
}
}
But doesnt work.
I need a quick fix.
项目ID: #11543569
关于项目
3个方案
远程项目
活跃的7 年前