Change 'orderby' in query
-
I’m wondering what options are available for ordering events in a query?
I’m using this code:
<?php $args = array( 'posts_per_page' => 1, 'eventDisplay' => 'all' ); $events = tribe_get_events( $args ); ?> <?php foreach ( $events as $post ) : setup_postdata( $post ); ?> <?php the_title(); ?> <?php endforeach; ?> <?php wp_reset_postdata(); ?>
But what would I do if I wanted to order events by, say, ‘venue’? Or is it only possible to order them by start date aswell as the default WP ones e.g. ‘title’ etc?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change 'orderby' in query’ is closed to new replies.