Support

Account

Home Forums General Issues query order by post title

Unread

query order by post title

  • I use the following query to generate a list, works perfectly.

    Now, however, I want to order my list by “post title” instead of “datum”

    How can I do that ?

    <?php

    // args
    $args = array(
    ‘posts_per_page’ => 999,
    ‘post_type’ => ‘lezing’,
    ‘orderby’ => ‘meta_value’,
    ‘order’ => ‘ASC’,
    ‘meta_key’ => ‘datum’,
    ‘meta_query’ => array(
    array(
    ‘key’ => ‘jaar’,
    ‘value’ => ‘2019’,
    ),
    )
    );

    // query
    $the_query = new WP_Query( $args );

Viewing 1 post (of 1 total)

The topic ‘query order by post title’ is closed to new replies.