Displaying Event metadata within the loop
-
Hi there,
What’s the best way to retrieve event metadata (for example, the location map or coordinates) while within the loop? For reference, I’m using the following WP_Query to display future events on my home page, alongside reviews/blog posts underneath:
<?php $events = array( 'post_type' => 'event', 'meta_query' => array( array( 'key' => '_start_ts', 'value' => current_time('timestamp'), 'compare' => '>=', 'type' =>'numeric' ) ), 'orderby' => 'meta_value_num', 'meta_key' => '_start_ts', 'order' => 'asc', ); $query = new WP_Query( $events ); ?>
I’d like to be able to get event data while in this loop, but I’m not sure how.
In the reverse situation, how can I get custom taxonomy information while within the EM_Events::output loop, being formatted by a custom events_list_item_format.php? I have my own custom taxonomy of production company, which I can get within the WP loop using
<?php echo get_the_term_list( $post->ID, 'company' ); ?>
.Thanks very much,
James
- The topic ‘Displaying Event metadata within the loop’ is closed to new replies.