I have added custom WP_Query to show posts in sidebar and in query I have set posts_per_page 3. It is working on english page but not working in vietnamese language.
Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps or if I can help with the issue quickly.
The link to the Vietnamese page redirects to the English page. When you say it's not working, please let us know what you mean by that. Does it display all posts or nothing?
Also, please share the code you're using for that WP_Query.
Regarding your issue, I want to confirm I understood it correctly.
First, you tried to set "posts_per_page" with a static value, and that did not work.
Now this value is defined in the admin backend, but still the Vietnamese page displays more than 3 posts.
I would like to request admin access to your site, in order to take a look for myself.
Please point me to the exact file where the query is.
I have set your next reply to be private so you can share credentials there.
Remember that it is always better to create a new admin user for me, then when we are done you can delete it.
Okay, a few things:
- It seems that the widget has no effect on the page at all, removing it does not change the frontend of the pages your directed me to hidden link hidden link
- I don't see from your screenshot where the string is registered for translation
- I couldn't look at the files, but from the screenshot it does not look like you are following our documentation on translating user input texts. There is an example there with translating texts from widgets, please make sure to follow it: https://wpml.org/documentation/support/translation-for-texts-by-other-plugins-and-themes/
- WPML String Translation is not installed, which is needed in order to translate user input text
If you want me to be able to point out to you where you are not using WPML correctly, I need to be able to see the code.
Please provide a Duplicator package, so I can do that.
Well, after trying to have an English widget and a Vietnamese widget separately, it looks like the value is simply not used by the Vietnamese widget.
I can't explain how this works on one server and not the other, especially since I can't see the code.
If you pass me a Duplicator package of the site, where the issue occurs and with admin credentials on it, I could take a deeper look at the code, but without that there isn't much I can do.
I will say that custom code is outside of our support policy. However, if I may see it, I can suggest what I think will help solve the issue.
Your next reply is private, if you want to pass along the package.
The topic ‘[Closed] posts_per_page not working in Vietnamese language’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.