facetwp

Sort price in FacetWP

£可爱£侵袭症+ 提交于 2020-07-09 06:16:02
问题 In FacetWP Plugin (for Wordpress) I want to sort my results after 'price', so I added a new custom filter, described in their documentation. Currently, the sort results are looking like this: 4.450 € 399 € 3.990 € I think, the code doesn't recognizes the last zero value. This is my code: add_filter( 'facetwp_sort_options', function( $options, $params ) { $options['price_desc'] = array( 'label' => 'Price (Highest)', 'query_args' => array( 'orderby' => 'price', 'meta_key' => 'price', 'order' =>