• Resolved PareStrano.it

    (@funesto)


    Hello!
    I am using Media Folder Gallery plug-in but sitemap shows there is only 1 image (i guess featured Image).

    Would this solution help detecting ALL the images present in the (Lightbox) gallery?

    function filter_wpseo_sitemap_urlimages( $images, $post_id ) { 
      array_push($images, 'https://www.example.com/wp-content/uploads/extra-image.jpg');
      return $images; 
    }; 
    add_filter( 'wpseo_sitemap_urlimages', 'filter_wpseo_sitemap_urlimages', 10, 2 );

    Where do I have to insert this code?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @funesto

    Thanks for reaching out about images in your sitemap.

    Adding the filter wpseo_sitemap_urlimages to your theme’s functions.php file will register images from page builders to the sitemap. Kindly refer to this to see how to implement it as I am unable to review your code. And you can read more here.

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Media Folder Gallery & Sitemap’ is closed to new replies.