And we are having exact same issue with images on the site – their ALT tags are being pulled from default languages, can we pull ALT tags from ACF fields instead?
https://imgur.com/UJ5V7lm
Link to product page with image – https://evrotrans.lv/product/threshold-fastening-clip-fastening-for-audi-a7-sportback-4g8898909a-kpl/
Please check this image ALT tags on other languages – https://evrotrans.lv/en/product/threshold-fastening-clip-fastening-for-audi-a7-sportback-4g8898909a-kpl/
Hello,
Thank you for getting in touch and we are sorry to hear about the issue you are facing.
For the metadata of our plugin, you can use the following variable to retrieve the values of custom fields available on the pages: https://rankmath.com/kb/variables-in-seo-title-description/#custom-field-advanced
As for the ALT image, are you currently using our plugin to add the missing ALT tags to the images? If you are using that feature you can set the same variable to be used in that section for the format that the plugin should use for the ALT tag.
Hope this helps solve your issues.
Don’t hesitate to get in touch if you have any other questions.
Thank you, partially this solves our issue. Now we can see all ACF fields are being added to the source code.
However there is an issue:
We see all fields on each language.
Original idea:
When viewing website in English – see only English ACF field
Current situation:
When viewing website in English – we see all 3 ACF fields – in English, Latvian and Russian
Hello,
That is happening because the data for the custom fields are saved for all languages with the same post ID to be associated with the correct post/page.
To get the specific language of the custom field for each language-specific page you might need to create custom variables by editing the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-variables
Even so, this would only be achievable if in the postmeta
table the data for the ACF custom field is saved with some sort of different identifiers, such as the meta_key
for each language.
If you are not sure how to create those custom variables, please share the screenshot of the postmeta table where it shows the custom fields for each language so we can advise further.
Don’t hesitate to get in touch if you have any other questions.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.