• Resolved sia77

    (@sia77)


    $args = array(
    ‘post_type’ => $postType,
    ‘posts_per_page’ => $numPosts,
    ‘offset’ => $offset + ($numPosts*$page),
    ‘meta_query’ => array(
    array(‘key’ =>’post_weight’,
    ‘type’ => ‘numeric’)
    ),
    ‘orderby’ => array(‘meta_value_num’=>’ASC’,’date’=>’DESC’),//$orderby,
    ‘order’ => ‘ASC’, //$order,
    ‘post_status’ => $post_status,
    ‘ignore_sticky_posts’ => false,
    ‘paged’ => $paged,
    );

    https://www.ads-software.com/plugins/ajax-load-more/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘order by meta value’ is closed to new replies.