Resolved
Reported for: WPML Multilingual CMS 3.2.2
Resolved in: 3.2.3
Overview of the issue
When the “Language name added as a parameter” option is chosen, the pagination URL is broken in the secondary languages.
Workaround
Add the following code to your theme’s functions.php file:
add_filter( 'get_pagenum_link', 'wpml_workaround_get_pagenum_link' ); function wpml_workaround_get_pagenum_link( $url ) { $current_language = apply_filters( 'wpml_current_language', '' ); $pattern = '/(\?lang=' . $current_language . ')(\/.*)/'; $url = preg_replace( $pattern, '$2', $url ); return $url; }
The issue has been resolved in the upcoming new version.
I am getting a different result. I can only use the LANGUAGE NAME ADDED AS A PARAMETER”, I would like to use the “DIFFERENT LANGUAGE DIRECTORY”.
Hello Jesse,
This is definitely not the way it should work. Please open a new ticket on our support forum https://wpml.org/forums/forum/english-support/
We will then be able to investigate what is wrong with the website and find a solution to the issue.