DocumentationOnline documentation for Ajax Load More
Ordering by Multiple Fields
Ajax Load More supports a single orderby parameter, however, the WP_Query class allows for ordering by multiple parameters. By using the alm_query_args filter you can extend the Ajax Load More query to order posts by multiple parameters.
1 2 3 4 5 6 7 8 9 10 |
<?php function my_movie_listing( $args, $id ){ // [ajax_load_more id="movie_listing" meta_key="order"] $args['orderby'] = array( 'meta_value_num' => 'ASC', 'title' => 'DESC' ); return $args; } add_filter( 'alm_query_args_movie_listing', 'my_movie_listing', 10, 2 ); |