the_date() doesn’t display on some posts
-
I am having a problem where the_date() will fail to display on some posts. I have check the entry and it does indeed have a publish date attached to it. Any suggestions?
This is the code from my index.php
<?php get_header() ?> <div id="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post('category_name=news'); ?> <h2 class="post_title"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </h2> <div class="post"><?php the_content(); ?></div> <div class="post_meta"> <p class="byline">Posted by <?php the_author_posts_link(); ?> on <?php the_date('m.d.Y'); ?></p> <?php if (function_exists('sharethis_button')) { sharethis_button(); } ?> </div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> <div class="navigation"> <div class="alignleft"> <?php next_posts_link('« Older Entries') ?> </div> <div class="alignright"> <?php previous_posts_link('Newer Entries »') ?> </div> </div> </div> <?php get_sidebar() ?> <?php get_footer() ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘the_date() doesn’t display on some posts’ is closed to new replies.