D
D
dimasibirak2017-03-02 14:41:16
WordPress
dimasibirak, 2017-03-02 14:41:16

Why is the woocommerce filter not working?

Good afternoon, please tell me what I'm doing wrong?
Product selection does not work.

$attributes = $product->get_attributes();
            $argss = array(
            'post_type' => 'product',
            'post_status' => 'publish',
            'ignore_sticky_posts'	=> 1,
            'posts_per_page' => 50,
            'tax_query' => array(
            array(
            'taxonomy' => 'product_cat',
            'field' => 'id',
            'terms' => $cat,
            'cena-polotna-banner'=>array('value'=>'4500')
            )
            )   
            );

            $loop = new WP_Query( $argss );

then I insert into the loop
filtering by attribute does not work
'cena-polotna-banner'=>array('value'=>'4500')

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question