Background of the issue:
I am trying to manage a bilingual WordPress website where the second language, French, is accessible through the suffix '/?lang=fr'. I noticed that Google indexes the original English posts but not the French posts with the suffix '/?lang=fr'. I suspect this might be related to the sitemap. Here is a link to a page where the issue can be seen: hidden link. But the problem is generalised to all pages with the suffix '/?lang=fr'.
Symptoms:
Google is not indexing the French posts. I suspect that the URL structure using '/?lang=fr' might be problematic for search engine crawling and indexing.
Questions:
Why does Google index the original English posts but not the French posts with the suffix '/?lang=fr'?
Could the issue be related to the sitemap?
How can I fix this issue with limited technical knowledge?
Can the WPML plugin help resolve this issue?
At the same time you can check your sitemap to see if the french pages are contained there (you can access it by typing yoursitedomain.com/sitemap.xml) check if the pages or posts exist in french as well.
If they are, then the problem is not on the site but on google and it's likely it will take longer if you use parameters instead of language directories which you can check the guide above to test and try.