• Resolved Sergey Makhnatkin

    (@makhnatkin)


    Hello, Rachel. The following code works fine upto wordpress 4.0, but it doesn’t work on 4.1.

    $args = array(
            'post_type' => 'brand',
            'posts_per_page' => '-1',
            'tax_query' => array(
                array(
                    'taxonomy' => 'catalogue',
                    'field'    => 'id',
                    'terms'    => $post_id,
                ),
            )
        );
        $loop2 = new WP_Query( $args );

    The following code works fine too on 4.1:

    $args = array(
            'post_type' => 'brand',
            'posts_per_page' => '-1',
            'tax_query' => array(
            )
        );
        $loop2 = new WP_Query( $args );

    Thank you

    https://wordpress.org/plugins/cpt-onomies/

Viewing 6 replies - 16 through 21 (of 21 total)
Viewing 6 replies - 16 through 21 (of 21 total)

The topic ‘tax_query problem with update 4.1’ is closed to new replies.