Support » Fixing WordPress » php the_date doesn´t work

  • In the frontpage of my WP I put some diferents loops to show the last post on some categories, and I put this in that way:

    ?php $posts = get_posts('numberposts=1&category=5'); foreach($posts as $post) : ?><?php the_title(); ?>. In <?php the_date(); ?><?php endforeach; ?>

    The title of the post shows in the right way, but the date doesn´t appear. Someone knows why that happens? I check the code, and I think I wrote it correctly.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘php the_date doesn´t work’ is closed to new replies.