Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Order post slider by custom field #240581

    Hi Devin,

    Thank you for you fast reply!
    There is a query filter in the postslider.php script; it seems to take ‘date’ and ‘rand’ but it won’t work with ‘title’ or any other standard “orderby” parameter. Any idea why this query won’t take anything else?

    the query:

    $query = array( ‘orderby’ => ‘rand’,
    ‘order’ => ‘ASC’,
    ‘paged’ => $page,
    ‘post_type’ => $params[‘post_type’],
    ‘posts_per_page’ => $params[‘items’],
    ‘offset’ => $params[‘offset’],
    ‘post__not_in’ => (!empty($no_duplicates)) ? $avia_config[‘posts_on_current_page’] : array(),
    ‘tax_query’ => array( array( ‘taxonomy’ => $params[‘taxonomy’],
    ‘field’ => ‘id’,
    ‘terms’ => $terms,
    ‘operator’ => ‘IN’)));

    Best regards,

Viewing 1 post (of 1 total)