Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was unable to see the translated focus keyphrases from Yoast SEO in the translation editor without manually searching for them.
Solution:
We recommended the following steps:
1. Navigate to WPML > Settings > Custom XML Configuration.
2. Add the following XML configuration:

<wpml-config>
    <custom-fields>
        <custom-field action="translate" encoding="json">_yoast_wpseo_focuskeywords</custom-field>
    <custom-field action="translate" encoding="json">_yoast_wpseo_keyword</custom-field>
    </custom-fields>
    <custom-fields-texts>
        <key name="_yoast_wpseo_focuskeywords">
            </key><key name="*">
                <key name="keyword"></key>
            </key>
        
    </custom-fields-texts>
</wpml-config>

3. Refresh the translation job by making a small edit to the original post or page.
After these steps, the focus keyphrases should appear in the translation editor.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Ilyes 4 months, 3 weeks ago.

Assisted by: Ilyes.

Author Posts
July 30, 2024 at 6:07 pm

ronaldT-5

Background of the issue:
I am trying to translate all the focus keyphrases stemming from Yoast SEO. Link to a page where the issue can be seen: hidden link

Symptoms:
I expected to see: [{"keyword":"Lanaudiere Alarm Surveillance","score":71},{"keyword":"Laurentian Alarm Monitoring","score":71},{"keyword":"Laurentian Alarm Surveillance","score":71}]. Instead, I got: nothing. They only show up if I specifically search for them via a left-hand side query.

Questions:
Why are the focus keyphrases from Yoast SEO not automatically showing up?
How can I ensure that the focus keyphrases appear without having to search for them manually?
Is there a setting for me to turn on?

July 30, 2024 at 6:41 pm
July 31, 2024 at 5:16 pm #16026685

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

I was able to replicate this behavior under a fresh WordPress installation, and I have escalated it to our compatibility team,

It could be related to the fact that these keywords are saved under JSON formatting different from the other SEO data, saved as strings,

I'm yet to receive feedback about this, I will let you know once we find an explanation and potentially, a solution,

Best,

August 1, 2024 at 12:25 am #16027206

ronaldT-5

Thanks

August 7, 2024 at 5:11 pm #16049461

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello,

Thank you for contacting WPML support team,

We finally have a workaround for this,

- Go to WPML > Settings > Custom XML Configuration.

- Add the following XML:

<wpml-config>
	<custom-fields>
		<custom-field action="translate" encoding="json">_yoast_wpseo_focuskeywords</custom-field>
    <custom-field action="translate" encoding="json">_yoast_wpseo_keyword</custom-field>
	</custom-fields>
	<custom-fields-texts>
		<key name="_yoast_wpseo_focuskeywords">
			<key name="*">
				<key name="keyword" />
			</key>
		</key>
	</custom-fields-texts>
</wpml-config>

- Refresh the translation job (Do a small edit to the original post/page)

You should then start seeing these fields on the translation editor,

August 7, 2024 at 6:19 pm #16049694

ronaldT-5

Fantastic workaround