Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to query posts using WP_Query and meta_query parameters:

$args = array(
    'post_type' => 'produkty',
    'meta_query' => array(
        'relation' => 'AND',
        array(
            'key' => 'produkt_aktywny',
            'value' => '1',
            'compare' => '='
        ),
        array(
            'key' => 'produkt_dostepnosc',
            'value' => '1',
            'compare' => '='
        )
    )
);

$query = new WP_Query( $args );

What should I add to order the results by two other meta keys ('produkt_kategoria' and 'produkt_cena')?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.