Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for pagination in multilingual (wpml) directory #1184

Open
wants to merge 1 commit into
base: alpha
Choose a base branch
from

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
Member

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

2 participants