Forums › Forums › Search & Filter Pro › Problems with S&F and Polylang
- This topic has 4 replies, 2 voices, and was last updated 8 years, 3 months ago by Anonymous.
-
Anonymous(Private) August 18, 2016 at 10:39 am #54913
Hello,
I’m trying to setup pretty simple filtering on two post type archives, for 4 different languages, using Polylang. I’m using simple search field (with Relevanssi) and some ACF fields as post meta filters, and I’ve used do_shortcode on the archive templates to display search results. I ran into couple problems I was hoping you could help me out with.
First and foremost, it seems like the search results are being pulled from all the languages. Relevanssi is using the ‘WPML/Polylang compatibility’ mode and I can’t see any extra configuration option I might be missing in S&F. I’ve also tried to limit the S&F results by the Polylang ‘Language’ taxonomy (excluding language ID’s in ‘Tags, Categories & Taxonomies’ tab), but every time I try to save the filter the exception field is emptied and presumably not applied. I have tried rebuilding the cache and search index, dropping wp_search_filter_* tables and re-enabling the plugin with no luck.
Another problem is that I’m using the relationship ACF field as a filter, pulling another post type as the option values. Dropdown gets correctly populated by the other post type, but I’m getting all the translations as separate options as well. This might have something to do with the first problem, as it seems the dropdown is populated from values used in search results.
Trevor(Private) August 18, 2016 at 10:44 am #54916Ross is the expert here on WPML/Polylang, as I have not used them yet, and he is on vacation this week. All I can do for now is point you towards for documentation (WPML and Polylang work much the same in the plugin):
https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/polylang/
and
https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/wpml/
Anonymous(Private) August 18, 2016 at 11:03 am #54918Thanks, Trevor!
I managed to get it working by using custom wp_query on these archive pages and filtering by language directly in the query arguments. I don’t know yet if there is any downside by doing it this way (except for the extra query), but it seems to be working correctly.
-
AuthorPosts