Display Wordpress posts using get_posts - the first post does not show the date

Hi, using get_posts, I grab all the messages marked as "news" and show them on this page. I use the_date () to get the date, but it is strange that the first message does not show the date, while all messages after that display the date of the penalty. I also used this identical code to display posts tagged as “blogs” on another page, but they work just fine.

Here is the page: http://appshare.nsdesign7.net/news/

Also here another page uses the same code but works fine: http://appshare.nsdesign7.net/blog/

<? $pageTitle = wp_title('',false,'');
if ($pageTitle == "  News") { ?>


 <?php $appsharenewspage = array( 'numberposts' => 10, 'order'=> 'ASC', 'orderby'=>     'title', 'category' => 3 ); 
 $postslist = get_posts( $appsharenewspage ); foreach ($postslist as $post) :     setup_postdata($post); ?> 
     <article class="newsstyle">
        <span class="imagestyle"><?php the_post_thumbnail(array(120,120)); ?>    </span>
        <h3><?php the_title(); ?></h3>
        <span class="date"><?php the_date(); ?></span>
       <?php the_excerpt(); ?>
           <div class="clear"></div>
    </article>
<?php endforeach; ?>

  <?php } ?>
+3
source share
4 answers
0

the_date() . , , .

the_time.

0

<?php echo get_the_date(); ?>.

the_date , .

: http://codex.wordpress.org/Function_Reference/get_the_date

0

. .. 2 . WP. , , php . the_time() the_date()

0

All Articles