Forums

[resolved] the_date() not working (4 posts)

  1. charlieholder
    Member
    Posted 2 months ago #

    I tried to add a line of code to my theme in order to show the post author and date/time of the post. This line of code only works on some of the posts. Other posts simply return blanks.

    <div class="postmeta">Posted by <?php the_author_posts_link(); ?> on <?php the_date('F j, Y \a\t g:i a'); ?>.</div>

    Any ideas why? http://charlieholder.com/blog/ to view live.

  2. whooami
    Member
    Posted 2 months ago #

    you need to look at the difference between using the the_date and the_time

    the answer is at the top of the documentation for the_date.

  3. charlieholder
    Member
    Posted 2 months ago #

    I can't believe I missed that. Thanks.

  4. whooami
    Member
    Posted 2 months ago #

    youre welcome :)

Reply

You must log in to post.

About this Topic