I'm having a weird issue with Wordpress which I cannot solve by myself, and for which I couldn't find an aswer over this and other websites.
Basically, I have a custom loop.
while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php the_post_thumbnail('featured'); ?></a> <div class="datetitle"> <div class="dateonly"><?php the_date('d.m.Y'); ?></div> <div class="titleonly"><?php the_title(); ?></div> </div> <?php endwhile; ?> <? wp_reset_postdata(); ?>
If I then create another custom query similar to this one, or even if i just duplicate this query further down my page, I don't get the php the_date to return any value! this is the strangest thing... what am I doing wrong?