• Resolved Zeliha Canderengul

    (@zelihacanderengul)


    Pictures in the slider are not included in my website’s sitemap. Do you have a solution for this?

    Theme: Gridzone
    The slider php code is:

    <?php if ( has_post_format( ‘gallery’ ) ): // Gallery ?>

    <div class=”post-format”>
    <?php $images = gridzone_post_images(); if ( !empty($images) ): ?>
    <div class=”slick-image-slide-wrapper”>
    <div class=”slick-image-slide-nav”></div>
    <div class=”slick-image-slide” id=”slide-<?php the_ID(); ?>”>
    <?php foreach ( $images as $image ): ?>
    <div>
    <?php $imageid = wp_get_attachment_image_src($image->ID,’large’); ?><?php $imageidb = wp_get_attachment_image_src($image->ID,’full’); ?>
    ” height=”<?php echo esc_attr( $imageid[2] ); ?>” src=”<?php echo esc_attr( $imageid[0] ); ?>” alt=”<?php echo esc_attr( $image->post_title ); ?>” loading=”lazy”>
    <div class=”image-caption”><?php echo $image->post_title; ?><?php echo ‘ <span>?ndir</span>’ ?></div>
    </div>
    <?php endforeach; ?>
    </div>
    <div class=”slick-image-slide-dots”></div>
    </div>
    <?php endif; ?>
    </div>

    <?php endif; ?>

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

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

    (@maybellyne)

    Hello Zeliha,

    Thanks for reaching out about your sitemap images.

    The Yoast SEO for WordPress plugin only analyzes the default WordPress content areas like the title, URL, and main content box and WP editor. Since you are adding images via a slider, the plugin won’t be able to detect it by default. In the past, we have tried to parse shortcodes and other content boxes with horrible results so we opted to provide plugin and theme developers with an API that they can use to pass their content to our page analysis.?

    As a workaround, we do offer a filter you can add to your site: wpseo_sitemap_urlimages which will help register the images so they appear on the sitemap. This help article explains more https://kb.yoast.com/kb/images-in-the-xml-sitemap/#image-filter2.

    Thread Starter Zeliha Canderengul

    (@zelihacanderengul)

    This example you quoted is complete nonsense. Because I will have to add each image one by one. There should be an option to do this automatically. If I have added 3 images in aa post, these 3 images should be added to the sitemap. I invite you to resolve this issue.

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    We know that images added via the WordPress block or classic editor (using the image block) should automatically be added to the sitemap. If you’re adding images through a custom slider (or other third-party page builders or custom theme boxes) that isn’t part of the standard WordPress default images (gallery or image block), then you really would have to use the wpseo_sitemap_urlimages filter mentioned previously to have the images added to the sitemap.

    I marked this thread as resolved due to a lack of activity by the original poster. The original poster is always welcome to re-open this topic.

    If you are not the original poster but have a similar issue, please read this post before opening a new request.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pictures in the slider are not included in my website’s sitemap’ is closed to new replies.