Change the URL of an image from wp_get_attachment_image_src except in the frontpage
-
26-04-2021 - |
Pregunta
This is the code I used that is working, but I want it to work only on product posts and not on the frontpage.
function alterImageSRC($image, $attachment_id, $size, $icon){
$image[0] = 'http://newimagesrc.com/myimage.jpg';
return $image;
}
add_filter('wp_get_attachment_image_src', 'alterImageSRC', 10, 4);
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a wordpress.stackexchange