• Resolved KareemAtfi

    (@kareematfi)


    Hello,
    I was using a custom template using the following code

    <div class="dpe-flexible-posts">
    	<?php while( $flexible_posts->have_posts() ) : $flexible_posts->the_post(); global $post; ?>
    		<article>
    		<?php if( $thumbnail == true ) {
    		if( has_post_thumbnail() ) { ?>
    		<?php the_post_thumbnail( $thumbsize ); ?>
                    <?php } elseif( 'image/' == substr( $post->post_mime_type, 0, 6 ) ) {
    		echo wp_get_attachment_image( $post->ID, $thumbsize );
    	   }  }	?>
    		<a href="<?php the_permalink(); ?>"><?php the_title(); ?</a>
    		<?php the_date('d F Y'); ?>
                    <?php the_excerpt(); ?>
    		</article>
    	<?php endwhile; ?>
    	</div>

    It is working alright, but the problem with the_date, there is always a post that is not showing it. There’s no pattern for it, if only one post it will have the_date but if more than one the_date will be missing in one of the posts. Any idea what may cause this issue?

    https://www.ads-software.com/plugins/flexible-posts-widget/

Viewing 1 replies (of 1 total)
  • Plugin Author DaveE

    (@dpe415)

    Hi Kareem,

    This is a feature/issue with the_date() function. See the “Special Note” on it’s codex page for details and remedies.

    Thanks for using the plugin!

Viewing 1 replies (of 1 total)
  • The topic ‘the_date doesn't show in one of posts’ is closed to new replies.