From 5c26a6b8204fc12a17dfbedb8459b47d8546a2a8 Mon Sep 17 00:00:00 2001 From: Foteini Giouleka Date: Tue, 11 Jun 2024 08:44:26 +0300 Subject: [PATCH] Fix for urls start with en --- includes/lib/transifex-live-integration-subdirectory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/lib/transifex-live-integration-subdirectory.php b/includes/lib/transifex-live-integration-subdirectory.php index 8b436d0..c9d6bfd 100644 --- a/includes/lib/transifex-live-integration-subdirectory.php +++ b/includes/lib/transifex-live-integration-subdirectory.php @@ -240,7 +240,7 @@ function custom_slug_rewrite_rules_hook() { } elseif ($post_type === 'page') { $rules['%lang%/' . $path . '?$'] = 'index.php?lang=$matches[1]&pagename=' . $post->post_name; } else { - $rules['%lang%/' . $path . '?$'] = 'index.php?lang=$matches[1]&' . $post_type . '=' . $post->post_name; + $rules['%lang%/' . $path . '?$'] = 'index.php?lang=$matches[1]&post_type=' . $post->post_type . '&p=' . $post->ID; } } }