display_date_widget not returning correct value
-
Hi,
I have attempted to create a custom template. As a test I have single-mec-events.php printing a few widgets:
get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main"> <?php while ( have_posts() ) : the_post(); ?> <?php $single = new MEC_skin_single(); $single_event_main = $single->get_event_mec(get_the_ID()); $single_event_obj = $single_event_main[0]; $single->display_cost_widget($single_event_obj); $single->display_category_widget($single_event_obj); $single->display_date_widget($single_event_obj); $single->display_time_widget($single_event_obj); $single->display_location_widget($single_event_obj); // Show Location ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php the_content(); ?> </article> <?php endwhile; ?> </main> </div> <?php get_footer();This is just a test, all works as expected except for display_date_widget which doesn’t return the date. I have attempted to debug and on following through and looking in display_date_widget (app/skins/single.php) I see that $this->date_format1 is null. The date format is set, in settings to ‘d M Y’. So the question is, am I missing something here or is this a bug?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘display_date_widget not returning correct value’ is closed to new replies.