wordpress - Query for filter product by multi attribute and price in Wooecommerce? -


i create query that:

<?php  $args = array(     'numberposts' => -1,     'post_type' => 'product',     'meta_query' => array(         'relation' => 'or',         array(             'key' => 'pa_color',             'value' => array('red'),             'compare' => 'in',         ),         array(             'key' => 'pa_for',             'value' => 'men',             'compare' => '=',         ),     ), );  $post = get_posts($args);  echo '<pre>'; print_r($post); echo '</pre>'; 

when try run code nothing. please me check query , how products attribute , price?. take meta_key in term_taxonomy table. many thanks!


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -