Title: Event in latest posts
Last modified: May 17, 2018

---

# Event in latest posts

 *  Resolved [lacike](https://wordpress.org/support/users/lacike/)
 * (@lacike)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/event-in-latest-posts/)
 * Hi,
 * is it possible to somehow have the newly created event appear also in list of
   latest posts?
 * My workflow is as follows:
    1. Enter event (which is not repeating) 2. Have it
   available in list of events on dedicated events page and also visible on sidebar
   3. However, I would also like the event to appear in latest posts (which my page
   showing to provide all the news)
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/event-in-latest-posts/#post-10294776)
 * at the moment you need custom coding to make this work and maybe this snippet
   can help you get started as we are quite limited with regards to custom coding
 *     ```
       function my_em_wp_query(){
       	$args = array(
       		'post_type' => 'event',
       		'posts_per_page' => 100,
       		'meta_query' => array( 'key' => '_start_ts', 'value' => current_time('timestamp'), 'compare' => '>=', 'type'=>'numeric' ),
       		'orderby' => 'meta_value_num',
       		'order' => 'ASC',
       		'meta_key' => '_start_ts',
       		'meta_value' => current_time('timestamp'),
       		'meta_value_num' => current_time('timestamp'),
       		'meta_compare' => '>='
       	);
   
       	// The Query
       	$query = new WP_Query( $args );
   
       	// The Loop
       	while($query->have_posts()):
       	$query->next_post();
       	$id = $query->post->ID;
       	echo '<li>';
       	echo get_the_title($id);
       	echo ' - '. get_post_meta($id, '_event_start_date', true);
       	echo '</li>';
       	endwhile;
   
       	// Reset Post Data
       	wp_reset_postdata();
       }
       add_shortcode('em_wp_query','my_em_wp_query');
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Event in latest posts’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/event-in-latest-posts/#post-10294776)
 * Status: resolved