Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 3 replies, has 0 voices.

Last updated by Bruno Kos 7 months, 3 weeks ago.

Assisted by: Bruno Kos.

Author Posts
September 16, 2025 at 2:52 am #17404129

johnz-12

Background of the issue:
I configured error URL format --Auto-generate from title (default), now I change it to Copy from original language if translation language uses encoded URLs. I want to change all webpage URL formats I have translated to the new URL format.

Symptoms:
No specific error message mentioned, but I need to change the URL format for translated pages.

Questions:
How do I change all webpage URL formats I have translated to the new URL format?

September 17, 2025 at 6:55 am #17408212

Bruno Kos
WPML Supporter since 12/2018

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

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Did you consider using https://wpml.org/documentation/getting-started-guide/sticky-links/ for this?

As if I understood this correctly, this should help resolve these changes with slugs.

But note that if this is about regenerating the translated slugs themselves after switching the URL format setting in WPML, Sticky Links won’t retroactively rebuild translated slugs to match the new format; it only updates internal links.

September 24, 2025 at 1:52 am #17427220

johnz-12

Need more support.

Now I want to confirm :
If URL format is "Copy from original language if translation language uses encoded URLs ",then if my english webpage address is hidden link , then jp webpage address will be hidden link ,right?

I dont want my url be translated.

If it is right, why I change URL format to "Copy from original language if translation language uses encoded URLs ",still all web url still is
hidden link.

So I want to update all url format into new format like this hidden link.

How to ?

need my login info for my website?

screenshot_2025-09-24_09-27-50.png
September 24, 2025 at 8:33 am #17427973

Bruno Kos
WPML Supporter since 12/2018

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

Timezone: Europe/Zagreb (GMT+02:00)

About that, can you check this?
https://wpml.org/forums/topic/bulk-translate-existing-pages-to-spanish-slugs-using-their-title/

Let me know if you think this is the same case (I think it is), because it is a rather complex issue which requires workaround in our code to make it work, because these slugs can be generated only once according to our code. So changing this later would not work without some changes, in particular this:
https://wpml.org/forums/topic/bulk-translate-existing-pages-to-spanish-slugs-using-their-title/#post-17042792, so that the final code looks like the following:

// it's an update and user do not want to translate urls so do not change the url
if ( $element_id ) {
	if ( $sitepress->get_setting( 'translated_document_page_url' ) !== 'translate' ) {
		$postarr['post_name'] = $wpdb->get_var(
			$wpdb->prepare(
				"SELECT post_name
				 FROM {$wpdb->posts}
				 WHERE ID=%d
				 LIMIT 1",
				$element_id
			)
		);
	}

	$existing_post            = get_post( $element_id );
	$postarr['post_date']     = $existing_post->post_date;
	$postarr['post_date_gmt'] = $existing_post->post_date_gmt;

	// Add your new condition here
	if ( $sitepress->get_setting( 'translated_document_page_url' ) == "auto-generate" ) {
		$postarr['post_name'] = sanitize_title_with_dashes(
			$wpdb->get_var(
				$wpdb->prepare(
					"SELECT post_title
					 FROM {$wpdb->posts}
					 WHERE ID=%d
					 LIMIT 1",
					$element_id
				)
			)
		);
	}
}

The topic ‘[Closed] I configure error URL format , Now how to I change all webpage url format I have translated.’ is closed to new replies.