Missing gallery images
-
Hello,
By consulting the sitemap of my site I noticed that there was only one image listed per product while there are 3 or 4.(https://moonlightcreations.fr/shop/paper-packs/knitted-digital-paper/)
The featured image is listed. The other images are in a gallery and I read that depending on the themes, Yoast couldn’t find those images.
I am using Avada theme.It is written to use the filter wpseo_sitemap_urlimages
I tried but nothing changes. I emptied my caches.
I am using this code in my functions.php file of my child theme. Is this correct ?
function filter_wpseo_sitemap_urlimages( $images, $post_id ) { array_push($images, 'https://moonlightcreations.fr/wp-content/uploads/2021/05/school-digital-paper-chalky-printable-design-chalk-paper-scrapbooking-collection-chevron.jpg'); return $images; }; add_filter( 'wpseo_sitemap_urlimages', 'filter_wpseo_sitemap_urlimages', 10, 2 );Thank you for helping me.
The page I need help with: [log in to see the link]
The topic ‘Missing gallery images’ is closed to new replies.