Skip to content

Fix for pagination in multilingual (wpml) directory#1184

Closed
AbyssWaIker wants to merge 1 commit intosovware:alphafrom
AbyssWaIker:patch-3
Closed

Fix for pagination in multilingual (wpml) directory#1184
AbyssWaIker wants to merge 1 commit intosovware:alphafrom
AbyssWaIker:patch-3

Conversation

@AbyssWaIker
Copy link
Contributor

In our wpml setup we have languages in separate "directories" (like "site", "site/pt-pr", "site/pt-br', "site/ru", "site/uk").

So when (at line 62) we attempt to remove home_url ("site/uk") from link ("site/permalink") it doesn't find the string and leaves the whole site address inside "pages" rewrite rule.

Leading to 404 when we our non english speaking visitors are trying to see page 2 of directory.

In our wpml setup we have languages in separate "directories" (like "site", "site/pt-pr", "site/pt-br', "site/ru", "site/uk").
So when (at line 62) we attempt to remove home_url ("site/uk") from link ("site/permalink") it doesn't find the string and leaves the whole site address inside "pages" rewrite rule. 
Leading to 404 when we our non english speaking visitors are trying to see page 2 of directory.
@AbyssWaIker AbyssWaIker changed the title Fixed pagination in multilingual (wpml) directory Fix for pagination in multilingual (wpml) directory Sep 9, 2022
@vairafiq
Copy link
Contributor

Hi @AbyssWaIker,

Thanks for your contribution. As we have an integration plugin for WPML, this code needs to be placed in this plugin. And we are going to add a hook in the core plugin.

@vairafiq vairafiq mentioned this pull request Sep 26, 2022
@Armanul46 Armanul46 closed this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants