wpseo_sitemap_urlimages filter doesn’t work
-
There is no images in generated sitemap.
I believe this is because of Photonic plugin used to handle images. I want to add a wpseo_sitemap_urlimages filter to add at least featured images in sitemap.
I’ve tried to implement the filter as follow:
function filter_wpseo_sitemap_urlimages( $images, $post_id ) { array_push($images, 'https://www.foto.labaj.com.pl/wp-content/uploads/2021/07/P7120044_1800x2400-G-SI.jpg'); return $images; }; add_filter( 'wpseo_sitemap_urlimages', 'filter_wpseo_sitemap_urlimages', 10, 2 );
No image is present in https://www.foto.labaj.com.pl/post-sitemap.xml even after purging caches.
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘wpseo_sitemap_urlimages filter doesn’t work’ is closed to new replies.