Support » Fixing WordPress » Trouble with displaying Post Dates

  • Howdy,

    I am currently having trouble displaying my posts date. Basically I want a page that will display all of my posts with their title, content, and date posted. I have everything working fine but the date. A note on this is that I created all of the posts on December 12th,2011 (yesterday). This is the date that is being displayed. However, I have gone into the posts table in the mysql database and altered the dates to be what I want. December 12 2011 is the date that is still being displayed on all of the posts even though the database is changed and the dashboard is also displaying correctly. Even when I create a new post today on the 13th 10/12/11 is still the date that is displaying!
    Another note: I am not sure that this would matter or not, but yesterday is also the day when I updated my wordpress to 3.2.1 from 2.6. which took place before I created any of these posts… not sure if that would effect it or not.

    Any thoughts would be greatly appreciated!

    My code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 3 replies - 1 through 3 (of 3 total)
  • I apologize I put the wrong code in there this is for my single.php
    Here is what you want:

    Template Name: blog_posts
        // Get News
        $news_args = array(
            'order_by' => 'post_date',
            'order' => 'DESC',
        $articles = get_posts($news_args);
    <?php include 'header.php' ?>
    <?php include 'top_logo.php' ?>
    <?php include 'top_nav.php' ?>
    <div style="margin-top: 20px;"></div>
        <td style="width:100%;  padding-right: 10px;" valign="top">
    		    <?php if ( $articles ): ?>
            <?php foreach ( $articles as $article ): ?>
            <div id="news_article_<?php echo $article->ID; ?>">
            <div><a style="color:blue;" class="title" href="<?php bloginfo( 'url' ) ?>/index.php/<?php echo $article->post_name ?>"><?php echo $article->post_title ?></a></div>
            <br />
    		<p style="font-size:12px; font-style:italic;"><?php  the_time('m/j/y g:i A') ?></p>
    		<p style="font-size:12px; font-style:italic;"><?php echo $article->ID;  ?></p>
            <div class="type_liner"><?php echo $article->post_content  ?>
            <div style="margin-top: 20px;"></div>
            <?php endforeach; ?>
        <?php endif; ?>
    <div style="margin-top: 20px;"></div>
    <?php include 'footer.php' ?>

    I’m having a very similar problem with posting the modified date – using the_modified_date instead of the_time.

    Were you able to figure out a solution?

    Also tried using the_modified_time and just the_time. None of them will show.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble with displaying Post Dates’ is closed to new replies.