For some reason on my main page (home-page) it is indexing 6 images. on other pages it is not.
Hi, I have also created a .js file in the assets>js folder and pasted all the lines from the API solution https://rankmath.com/kb/content-analysis-api/
This solution started to see some images on pages sitemap but nothing on post sitemap.
When I turn on to include Featured image, then the other mount currently seen disappears and the value remains at “1” which only includes Featured image and excludes other images.
would the API be a potential fix for this issue?
I think the best solution is what we suggested, to ask the WP Bakery team about it, since it will fix that issue easily (since the problem seems to be at their side).
As you saw, using that solution (your JS), you were able to detect some but not all of them, so they will need to fix this issue as they did with other SEO plugins.
Looking forward to help you.
Unfortunately I do not have a support licence with them because it came with the theme.
Other people using same theme have no issues with indexing. Same theme, same version but different results.
So no solution found.
I have done more testing with the code you provided and the API. When erased them all and fresh installed rankmath – there was no difference in the amount of images detected, so it is safe to say the those solutions do not work in my case.
Is there somebody you can recommend that could look into this for me as a service? I am really keen on getting this to work.
We are sorry but there isn’t much we can do in this case. The solutions we have provided should have worked but they didn’t which means there is an underlying issue with your theme.
You will need to get a support license for your theme and talk to WP Bakery.
Also, the API we provided cannot be used as-is – you have to be familiar with the WPBakery code to use it.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
I had reached out to the authors of the theme I use and they have contributed to this thread.
Can I ask you to check their response/question?
Hello, Manuel here from Undsgn, developer of Uncode theme.
Uncode uses a simple filter provided by Yoast to add images not loaded through the canonical way: that is
wpseo_sitemap_urlimages(visible here on Github: https://github.com/Yoast/wordpress-seo/blob/a2829e5941f653ee801551606050ddb9ec36ad71/inc/sitemaps/class-sitemap-image-parser.php#L129). This allows us to included images in the Yoast sitemap, even if the images aren’t in the post content, but they are simply loaded via our shortcodes. This is a common praxis suggested by Yoast, and here is a shot of our function loaded in the theme https://undsgn.d.pr/9uV5cR. Please, let us know why Rank Math doesn’t take this into consideration and we’ll be more than happy to fix it in on our part, if necessary.
The filter my colleague provided here should work: https://support.rankmath.com/ticket/images-from-posts-and-pages-are-at-1/?view=all#post-49960
Divi Builder also uses this filter to add the Shortcode images in Rank Math Sitemap. Did you clear the cache by updating Sitemap Settings after adding this filter?
I wanted to add this code in your theme’s functions.php file but I couldn’t login with the username/password you added in the Sensitive Data Section.
Looking forward to helping you.
Thanks for your response.
Please use the details provided. I have included space in the password after % as otherwise it would not submit as whole. (i believe it thinks it is a code)
- This reply was modified 2 weeks, 6 days ago by Arthur.
I have updated the sensitive data as requested. Can you please check further?
The code you added in the filter is different from what Manuel has shared: https://support.rankmath.com/ticket/images-from-posts-and-pages-are-at-1/page/2/?view=all#post-51461
Please add this code in the filter function: https://undsgn.d.pr/9uV5cR
I hope that helps.
The filter currently added is provided by you as a solution
The filter provided by Manuel is from Yoast integration, which already is being used and it works for Yoast.
Can you convert the code to Rank Math?
This is a common praxis suggested by Yoast, and here is a shot of our function loaded in the theme https://undsgn.d.pr/9uV5cR.
Please ask Manuel to share the code in the screenshot he has provided so I can copy it and add it in the Rank Math filter.
Looking forward to helping you.
You must be logged in to reply to this ticket.