This thread is resolved. Here is a description of the problem and solution.
Problem:
Yoast-schema-graph showing mixed URLs for the default language.
Solution:
The issue is escalated to our developers and will be fixed in a future version of WPML SEO. Meanwhile, please apply the suggested workaround to resolve the issue on your site.
1. Edit the functions.php file of your theme with a code editor or in Appearance -> Theme Editor.
2. Add this function and save the change.
add_action('wpseo_frontend_presentation', function($presentation, $context) { $context->site_url = home_url(); if (!empty($context->company_logo_meta)) { $translated_img = wp_get_attachment_image_src($context->company_logo_meta['id'], 'full'); $context->company_logo_meta['url'] = !empty($translated_img[0]) ? $translated_img[0] : $context->company_logo_meta['url']; } return $presentation; }, 10, 2);
3. Make a small change on the default language page and press the Update button. And also update the translations of the pages.
**** Important! Please make a full site backup (files and DB) before you proceed with those steps****
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 2 replies, has 2 voices.
Last updated by Raphael Cavalieri 1 year, 11 months ago.
Assisted by: Itamar.