We have been using your plugin and its quite good out of the box, thank you.
The issue came when we needed to filter something by taxonomy. We followed your documentation, which did suggest the correct solution, but it was still not working. Our taxonomy was cities and it is text based.
When we did a search Lift was querying the taxonomy, but still the results were not being filtering.. after endless hours of debugging it came down to lift setting the taxonomy terms as typed where as they need to be lower case.
We did a slight hack to bypass this and everything works as expected:
$tax_queries = $query->tax_query->queries;
foreach( $tax_queries as $query_index => $tax_query )
{
// if terms are id based then no need to lowercase them
if( 'id' == $tax_query['field'] )
continue;
foreach( $tax_query['terms'] as $term_index => $term )
{
$tax_query['terms'][$term_index] = strtolower($term);
}
$tax_queries[$query_index] = $tax_query;
}
$query->set('tax_query', $tax_queries);
Hi,
We have been using your plugin and its quite good out of the box, thank you.
The issue came when we needed to filter something by taxonomy. We followed your documentation, which did suggest the correct solution, but it was still not working. Our taxonomy was cities and it is text based.
When we did a search Lift was querying the taxonomy, but still the results were not being filtering.. after endless hours of debugging it came down to lift setting the taxonomy terms as typed where as they need to be lower case.
We did a slight hack to bypass this and everything works as expected:
<?php function Lift_ModifyTaxonomies($query) { if( is_admin() || !$query->is_main_query() || !$query->is_search ) return $query;
}
add_filter('pre_get_posts','Lift_ModifyTaxonomies'); ?>
We hope this comes helpful to anyone until it gets fixed in the plugin.