Forums › Forums › Search & Filter Pro › Search & Filter with WPML
Tagged: WPML
- This topic has 5 replies, 2 voices, and was last updated 8 years ago by
Trevor.
-
Trevor(Private) November 1, 2017 at 3:36 pm #139634
Hi
It is possible that I have misunderstood you, but I want to be sure before I address the concern.
The way WPML works is to have posts and taxonomy terms translated, and it keeps each language version separated. You want to be able to select a term (like Certification) and see post results from both languages at the same time by joining Certification with the translated term as well?
Trevor(Private) November 2, 2017 at 12:39 pm #139831It is possible you might achieve this by using the Edit Query Arguments filter, but I do not think it would be easy.
Other users have posted examples of their own usage in the forums, so it might be worth searching for the filter name:
sf_edit_query_argsAnonymous(Private) November 2, 2017 at 2:47 pm #139846Thanks, Trevor. I tried adding the following to my functions.php but didn’t see the results I was looking for either.
function filter_function_name( $query_args, $sfid ) { //if search form ID = 100, then do something with this query if($sfid==261) { //modify $query_args here before returning it $query_args = array( 'post_type' => 'resource-item', 'suppress_filters' => true, 'orderby' => 'post_date', 'order' => 'DESC', 'tag__in' => array( 151, 348, 419 ), 'posts_per_page' => 10 ); } return $query_args; } add_filter( 'sf_edit_query_args', 'filter_function_name', 20, 2 );I’ve been searching through the forum, and haven’t been able to find an example that includes the tags.
-
AuthorPosts