- Status
- 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.