• Resolved mikyantonescu

    (@mikyantonescu)


    Hello,

    I’m trying to remove all the images from the Yoast generated sitemap (so that only website links remain), but all suggestions which I found don’t fix my problem. I even added the following code
    /* Remove Images From Yoast Sitemap */
    add_filter( ‘wpseo_xml_sitemap_img’, ‘__return_false’ );
    in the functions.php, but nothing happens even after forcing the sitemap refresh by disabling and enabling the sitemap. (https://yoast.com/help/images-in-the-xml-sitemap/)
    What else should I do?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Can you please try adding the following code again to your currently active theme functions.php file and share the relevant sitemap URL here with us so that we can verify the issue on our end?

    add_filter( 'wpseo_xml_sitemap_img', '__return_false' );
    
    Sa?a

    (@stodorovic)

    You can try new filter wpseo_xml_sitemap_include_images which is more efficient.

    Thread Starter mikyantonescu

    (@mikyantonescu)

    Hello,

    Sorry for the late reply. Thank you for the help. It worked only with the new filter wpseo_xml_sitemap_include_images.

    Plugin Support devnihil

    (@devnihil)

    @mikyantonescu Thanks for confirming that the wpseo_xml_sitemap_include_images filter was successful for you. We are going ahead and marking this issue as resolved but please let us know if you require any further assistance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove Images from Sitemap’ is closed to new replies.