Add custom WP_Query loop attributes
-
Hi there,
could you add custom WP_Query attributes to the widget? I coded it locally, it looks like this:
//custom wp-query arguments if( ! empty ($args['wp_query'])){ $string = $args['wp_query']; $a = explode(';', $string); foreach ($a as $result) { $b = explode(',', $result); $array[$b[0]] = $b[1]; } $query = array_merge($query, $array); }It allows filtering for custom fields, or other miscellaneous things, separated by commas and semicolons. I used it to filter woocommerce products by featured (“meta_key,_featured;meta_value,yes”).
Thanks for a great plugin!
The topic ‘Add custom WP_Query loop attributes’ is closed to new replies.