Desarrollar software
Cerrado
Publicado
hace 7 años
Pagado a la entrega
$10-30 USD
Pagado a la entrega
Cerrado
Pagado a la entrega
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.
Nº del proyecto: #11543569
Sobre el proyecto
3 propuestas
Proyecto remoto
Activo hace 7 años