Tell us what you are trying to do?
With latest version of Legacy Views I'm having problems creating new multi-lingual views querying and filtering a new custom post type I created (Wines). FYI, although I don't think it is relevant, there is a Many to Many relationship between WP Posts post-type and this Wines custom post-type.
PREFACE: We use Polylang on this site and have always handled multi-lingual content by using a Types custom-field (English or Spanish term) that corresponds with the WP native language via Polylang for any particular page, post or custom post. We then use Toolset conditional shortcode to select either the English or Spanish verbiage. In this manner we create a single template that can be used for either language, merely by changing the custom field for language.
This has always worked well (except for minor glitches that came up when using Theme Builder) which we always worked around. I have thousands of pages created this way that have always worked with both native and custom post types using Polylang with Legacy Views.
I have recently created a view querying that new post type (Wines) I recently created. The view is displaying as expected on the English (primary language in Polylang/Wordpress) but displays nothing when running the same view on a Spanish page which has both the WordPress/Polylang secondary language (Spanish) and the custom field with term "Spanish" selected (which is only relevant when displaying labels in the view loop).
All of the previously created pages, posts and custom posts created in the manner which have been queried in Legacy Views still work as expected. But the new view using same methods with the new post type are not displaying when a Spanish (secondary) page/post is displaying the view.
Here is an example of an English post displaying the view (which includes loop querying Wines custom post type): hidden link
Here is the Spanish page displaying the same Legacy View: hidden link
Please advise on what can be done to solve this issue. Thanks.
Hi,
Thank you for contacting us and I'd be happy to assist.
The setup of using a custom field for language-based filtering seems logical and should be working for new posts and views too.
To troubleshoot this, I recommend creating a simple view that lists all posts and their respective language custom field values. This will give you an overview of why some posts are not working with the filtering or conditional display.
I hope this helps and let me know how it goes.
regards,
Waqar