Title: Pulling Meta data
Last modified: March 4, 2021

---

# Pulling Meta data

 *  Resolved [ferdiax](https://wordpress.org/support/users/ferdiax/)
 * (@ferdiax)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/pulling-meta-data/)
 * Hello,
 * I’m laying out a page with Post and Events in a grid and want to keep the layout
   consistent. I’m using the Kadence Post block to pull in the Posts and Events 
   using the code below. It works to some extent except for the Event start time
   and the Event location. I’m using ‘mec_start_time’ for the start time and ‘mec_location’
   for the Venue but both are turning up empty. Should i be using other variable
   names?
 * Hope you can help.
    Thanks
 * <?php
 *     ```
       add_action('kadence_blocks_post_loop_content', 'custom_evnts_meta_loop', 25, 1);
   
       function custom_evnts_meta_loop( $atts ) {
       	if ( 'mec-events' == $atts['postType'] ) {
       		?>
       <div class="event-meta">
       <p class="event-date"><strong>Event Date:</strong> <?php echo get_post_meta( get_the_ID(), 'mec_start_date', true); ?>
       <p class="event-time"><strong>Start at:</strong> <?php echo get_post_meta( get_the_ID(), 'mec_start_time', true); ?> 
       <p class="event-location"><strong>Location:</strong> <?php echo get_post_meta( get_the_ID(), 'mec_location', true); ?>
       <p class="event-costs"><strong>Costs:</strong> <?php echo get_post_meta( get_the_ID(), 'mec_cost', true); ?>	
       </p>
       </div>
       <?php
       	}
       }
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpulling-meta-data%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [webnus](https://wordpress.org/support/users/webnus/)
 * (@webnus)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/pulling-meta-data/#post-14142112)
 * Hello [@ferdiax](https://wordpress.org/support/users/ferdiax/),
 * You couldn’t have created your own code for using on MEC. So we provided all 
   the available hooks and tweak codes for MEC in this article: [https://webnus.net/dox/modern-events-calendar/overriding-mec-single-event-page/](https://webnus.net/dox/modern-events-calendar/overriding-mec-single-event-page/).
 * Regarding your sent code, we don’t provide our users with the mec_start_time 
   but you can find time information in the article above (start/end hour, minutes,
   timestamp, and …).
 * Best Regards

Viewing 1 replies (of 1 total)

The topic ‘Pulling Meta data’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/modern-events-calendar-lite_e2f4ff.
   svg)
 * [Modern Events Calendar Lite](https://wordpress.org/plugins/modern-events-calendar-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/modern-events-calendar-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/modern-events-calendar-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/modern-events-calendar-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/modern-events-calendar-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/modern-events-calendar-lite/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [webnus](https://wordpress.org/support/users/webnus/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/pulling-meta-data/#post-14142112)
 * Status: resolved