• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

BUG Images not found when generating Sitemap.

rosener

New member
Messages
3
Likes
0
Points
1
#1
I just noticed on my sitemap (https://suncatcherstudio.com/page-sitemap.xml) that
when using "Woody Snippets", images are not found or listed. For example, see the
second entry (All Articles). The sitemap shows 0 images.
However, there are numerous images at this location. The second image below shows how
I included this file. It simply loads the following file:
https://suncatcherstudio.com/php-snippets/menus/all-articles-output.html

I also believe my WordPress "Broken Link Checker" does not search through information
included via a Woody Snippet.

Am I doing something wrong? How can I get my images included in the sitemap?
I am worried that Google is not indexing these files like it should.
Please HELP!

Thanks,
Bill
 

Attachments

Temyk

Support team
Staff member
Messages
263
Likes
19
Points
18
#2
Hello.

This is because Yoast does not handle shortcodes in the post text. You can fix this with this code:
PHP:
add_filter( 'wpseo_pre_analysis_post_content', function( $content, $post ){
    return do_shortcode($content);
});
Put this code in a PHP snippet that runs everywhere.
After that, you will need Yoast to update the Sitemap.
 

rosener

New member
Messages
3
Likes
0
Points
1
#3
As shown in the attached images, I created a PHP Snippet
that runs everywhere with the code shown above. But when
I modify files, the sitemap is still displaying 0 images on pages
that contain images. For example, notice the LAST 4 entries
in the sitemap.

https://suncatcherstudio.com/page-sitemap.xml

Any ideas on why this is not working?
Thanks,
Bill
 

Attachments

Temyk

Support team
Staff member
Messages
263
Likes
19
Points
18
#4
I think you should contact the technical support of the Yoast plugin, because this is their functionality. The problem is most likely not in the plugin Woody